feat: primereact lib
This commit is contained in:
14
src/components/ui/DataPicker.tsx
Normal file
14
src/components/ui/DataPicker.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { FunctionComponent } from "preact";
|
||||
import { Calendar } from "primereact/calendar";
|
||||
import { FormEvent } from "primereact/ts-helpers";
|
||||
|
||||
interface DatePickerProps {
|
||||
value?: Date;
|
||||
onChange?: (e: FormEvent<Date>) => void;
|
||||
}
|
||||
|
||||
const DatePicker: FunctionComponent<DatePickerProps> = ({ value = new Date(), onChange }: DatePickerProps) => {
|
||||
return <Calendar value={value} onChange={onChange} />;
|
||||
};
|
||||
|
||||
export default DatePicker;
|
||||
Reference in New Issue
Block a user