Skip to content

Commit

Permalink
feat: Datepicker transitions (calcom#15313)
Browse files Browse the repository at this point in the history
* fix: Kbar component styles

Fix Kbar styles on active state

* refactor: Add transition to event type list item

The commit refactors the event type list item component by adding a transition effect to improve the user experience.

* refactor: Add transition effect to DatePicker component

Add transition effect to improve the user experience in the DatePicker component.

---------

Co-authored-by: Udit Takkar <[email protected]>
  • Loading branch information
hichemfantar and Udit-takkar authored Jun 8, 2024
1 parent b310eb1 commit 5c95268
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/features/calendars/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const Day = ({
type="button"
style={disabled ? { ...disabledDateButtonEmbedStyles } : { ...enabledDateButtonEmbedStyles }}
className={classNames(
"disabled:text-bookinglighter absolute bottom-0 left-0 right-0 top-0 mx-auto w-full rounded-md border-2 border-transparent text-center text-sm font-medium disabled:cursor-default disabled:border-transparent disabled:font-light ",
"disabled:text-bookinglighter absolute bottom-0 left-0 right-0 top-0 mx-auto w-full rounded-md border-2 border-transparent text-center text-sm font-medium transition disabled:cursor-default disabled:border-transparent disabled:font-light ",
active
? "bg-brand-default text-brand"
: !disabled
Expand Down Expand Up @@ -254,7 +254,7 @@ const Days = ({
<div key={`e-${idx}`} />
) : props.isPending ? (
<button
className="bg-muted text-muted absolute bottom-0 left-0 right-0 top-0 mx-auto flex w-full items-center justify-center rounded-sm border-transparent text-center font-medium opacity-50"
className="bg-muted text-muted absolute bottom-0 left-0 right-0 top-0 mx-auto flex w-full items-center justify-center rounded-sm border-transparent text-center font-medium opacity-50 transition"
key={`e-${idx}`}
disabled>
<SkeletonText className="h-4 w-5" />
Expand Down Expand Up @@ -342,7 +342,7 @@ const DatePicker = ({
<div className="flex">
<Button
className={classNames(
`group p-1 opacity-70 hover:opacity-100 rtl:rotate-180`,
`group p-1 opacity-70 transition hover:opacity-100 rtl:rotate-180`,
!browsingDate.isAfter(dayjs()) &&
`disabled:text-bookinglighter hover:bg-background hover:opacity-70`,
customClassNames?.datePickerToggle
Expand All @@ -356,7 +356,7 @@ const DatePicker = ({
/>
<Button
className={classNames(
`group p-1 opacity-70 hover:opacity-100 rtl:rotate-180`,
`group p-1 opacity-70 transition hover:opacity-100 rtl:rotate-180`,
`${customClassNames?.datePickerToggle}`
)}
onClick={() => changeMonth(+1)}
Expand Down

0 comments on commit 5c95268

Please sign in to comment.