Skip to content

Commit

Permalink
fix(datepicker): button type (themesberg#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
rluders authored Sep 22, 2023
1 parent b1357c6 commit 496ed1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 126 deletions.
126 changes: 0 additions & 126 deletions src/components/Datepicker/Buttons.tsx

This file was deleted.

5 changes: 5 additions & 0 deletions src/components/Datepicker/Datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ export const Datepicker: FC<DatepickerProps> = ({
{title && <div className={theme.popup.header.title}>{title}</div>}
<div className={theme.popup.header.selectors.base}>
<button
type="button"
className={twMerge(
theme.popup.header.selectors.button.base,
theme.popup.header.selectors.button.prev,
Expand All @@ -260,6 +261,7 @@ export const Datepicker: FC<DatepickerProps> = ({
<HiArrowLeft />
</button>
<button
type="button"
className={twMerge(
theme.popup.header.selectors.button.base,
theme.popup.header.selectors.button.view,
Expand All @@ -269,6 +271,7 @@ export const Datepicker: FC<DatepickerProps> = ({
{getViewTitle()}
</button>
<button
type="button"
className={twMerge(
theme.popup.header.selectors.button.base,
theme.popup.header.selectors.button.next,
Expand All @@ -284,6 +287,7 @@ export const Datepicker: FC<DatepickerProps> = ({
<div className={theme.popup.footer.base}>
{showTodayButton && (
<button
type="button"
className={twMerge(theme.popup.footer.button.base, theme.popup.footer.button.today)}
onClick={() => {
const today = new Date();
Expand All @@ -296,6 +300,7 @@ export const Datepicker: FC<DatepickerProps> = ({
)}
{showClearButton && (
<button
type="button"
className={twMerge(theme.popup.footer.button.base, theme.popup.footer.button.clear)}
onClick={() => {
changeSelectedDate(defaultDate, true);
Expand Down

0 comments on commit 496ed1e

Please sign in to comment.