From 496ed1e9e066edae1eec021d0f7a042a82467c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20L=C3=BCders?= Date: Fri, 22 Sep 2023 16:13:07 +0200 Subject: [PATCH] fix(datepicker): button type (#984) --- src/components/Datepicker/Buttons.tsx | 126 ----------------------- src/components/Datepicker/Datepicker.tsx | 5 + 2 files changed, 5 insertions(+), 126 deletions(-) delete mode 100644 src/components/Datepicker/Buttons.tsx diff --git a/src/components/Datepicker/Buttons.tsx b/src/components/Datepicker/Buttons.tsx deleted file mode 100644 index d54065947..000000000 --- a/src/components/Datepicker/Buttons.tsx +++ /dev/null @@ -1,126 +0,0 @@ -// import { useContext } from 'react'; -// import { twMerge } from 'tailwind-merge'; -// import type { Views } from '../../helpers/date'; -// import { goToPrevNext, startOfYearPeriod } from '../../helpers/date'; -// import { DatePickerContext } from './DatepickerContext'; - -// export interface FlowbiteDatePickerButtonTheme { -// root: { -// base: string; -// }; -// } - -// export const ButtonPrevMonth = () => { -// const { selectedDate, changeSelectedDate, view, options } = useContext(DatePickerContext); - -// return ( -// -// ); -// }; - -// export const ButtonSelectMonth = () => { -// const { selectedDate, view, setView, options, getFormattedDate } = useContext(DatePickerContext); - -// const calculateView = (): Views => { -// if (view === 'days') return 'months'; -// if (view === 'months') return 'years'; -// if (view === 'years') return 'decades'; -// return view; -// }; - -// return ( -// -// ); -// }; - -// export const ButtonNextMonth = () => { -// const { selectedDate, changeSelectedDate, view, options } = useContext(DatePickerContext); -// return ( -// -// ); -// }; - -// export const ButtonToday = () => { -// const { changeSelectedDate, setView, options } = useContext(DatePickerContext); -// return ( -// -// ); -// }; - -// export const ButtonClear = () => { -// const { setShowSelectedDate, options } = useContext(DatePickerContext); -// return ( -// -// ); -// }; diff --git a/src/components/Datepicker/Datepicker.tsx b/src/components/Datepicker/Datepicker.tsx index 9470c29d1..72fe930dc 100644 --- a/src/components/Datepicker/Datepicker.tsx +++ b/src/components/Datepicker/Datepicker.tsx @@ -251,6 +251,7 @@ export const Datepicker: FC = ({ {title &&
{title}
}