Skip to content

Instantly share code, notes, and snippets.

View jailsonpaca's full-sized avatar

Jailson Pacagnan Santana jailsonpaca

View GitHub Profile
@brenopolanski
brenopolanski / file-upload.tsx
Created May 5, 2021 00:37 — forked from Sqvall/file-upload.tsx
File Upload with Chakra UI and react-hook-form
import { ReactNode, useRef } from 'react'
import { Button, FormControl, FormErrorMessage, FormLabel, Icon, InputGroup } from '@chakra-ui/react'
import { useForm, UseFormRegisterReturn } from 'react-hook-form'
import { FiFile } from 'react-icons/fi'
type FileUploadProps = {
register: UseFormRegisterReturn
accept?: string
multiple?: boolean
children?: ReactNode
@igoro00
igoro00 / Chakra-UI x React-datepicker.md
Last active September 20, 2024 18:56 — forked from baumandm/Chakra-UI x React-datepicker.md
Chakra-UI x React-datepicker

Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.

<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />

Clearable version:

<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} isClearable={true} />
@baumandm
baumandm / Chakra-UI x React-datepicker.md
Last active May 29, 2024 05:29
Chakra-UI x React-datepicker

⚠️ I'd recommend using this fork by @igoro00 which has better theme support.


Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.

<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />
@jonasgroendahl
jonasgroendahl / calendar.tsx
Created June 17, 2020 14:07
Calendar Agenda
import React, {useState} from 'react';
import {View, TouchableOpacity} from 'react-native';
import {Agenda} from 'react-native-calendars';
import {Card, Avatar} from 'react-native-paper';
import Typography from '../components/Typography';
const timeToString = (time) => {
const date = new Date(time);
return date.toISOString().split('T')[0];
};
@artyorsh
artyorsh / mapping.json
Last active March 24, 2024 15:54
Time Picker example with UI Kitten and DateTimePicker
{
"components": {
"Timepicker": {
"meta": {
"scope": "all",
"parameters": {
"minHeight": {
"type": "number"
},
"paddingHorizontal": {
@imedadel
imedadel / index.js
Created May 26, 2019 09:06
An example of using React Hooks with jQuery and Chosen plugin. `Chosen` is the original example using a class and `Chosed` is the "modern" approach using functions and hooks.
const Chosed = (props) => {
const elmt = React.useRef()
React.useLayoutEffect(()=>{
const $elmt = $(elmt.current)
const handleChange = (e) => {
props.onChange(e.target.value);
}
$elmt.chosen()
@NoriSte
NoriSte / redux-saga-typeguard.ts
Last active November 1, 2023 02:22
Redux-saga + Typescript: implementing typeguard for Axios AJAX requests
import { AxiosResponse } from "axios";
// the kind of data I expect from the AJAX request...
interface AuthData {
access_token?: string;
refresh_token?: string;
}
// ... a type dedicated to the Axios response...
type AuthResponse = AxiosResponse<AuthData>;
@hungvu193
hungvu193 / Bitrise.io Documents.md
Last active September 20, 2023 12:38
How to setup Bitrise.io to run a react native project

Set up a React Native app on Bitrise

Getting Started

Automating React Native apps on Bitrise? Sure thing! Let's see how! 🤖

  1. Log in to Bitrise and click +Add new app on your Dashboard!
  2. Connect your repository from your connected source code provider or add it manually. Connect repo
  3. Setup repository access (See DevCenter for detailed explanation!) Setup repo
  4. Validation setup: choose a branch for our scanner, this will help automation. How about a cuppa coffee while we are scanning your app?
@CodeMyUI
CodeMyUI / index.html
Created April 23, 2018 07:46
Sidebar Menu Hover Show/Hide CSS
<html>
<head>
</head>
<body><div class="area"></div><nav class="main-menu">
<ul>
<li>
<a href="http://justinfarrow.com">
<i class="fa fa-home fa-2x"></i>
<span class="nav-text">
@dmurawsky
dmurawsky / index.js
Last active May 22, 2024 19:01
How to make a page full height in Next.js
const FullHeightPage = () => (
<div>
Hello World!
<style global jsx>{`
html,
body,
body > div:first-child,
div#__next,
div#__next > div {
height: 100%;