Skip to content

Instantly share code, notes, and snippets.

View nishimweprince's full-sized avatar

Nishimwe Prince nishimweprince

View GitHub Profile
@nishimweprince
nishimweprince / Input.tsx
Created June 20, 2024 14:51
A reusable component for Form Input.
import {
ChangeEvent,
FC,
LegacyRef,
MouseEventHandler,
ReactNode,
useEffect,
useRef,
} from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@nishimweprince
nishimweprince / DatePicker.tsx
Last active August 27, 2024 01:45
A reusable component for Shadcn DatePicker with years and months selection
import { CalendarIcon } from '@radix-ui/react-icons';
import { format } from 'date-fns';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { Calendar } from '@/components/ui/calendar';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/components/ui/popover';