Skip to content

Commit

Permalink
🐛 Datepicker doesn't focus on today's cell (#3669)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiy93 authored Nov 4, 2024
1 parent cac1080 commit c461e8f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const StyledCell = styled(Typography)<{
$highlight: Selections
$disabled: boolean
$density: 'compact' | 'comfortable'
$focused: boolean
}>`
display: flex;
justify-content: center;
Expand All @@ -22,9 +23,8 @@ const StyledCell = styled(Typography)<{
&:hover {
background-color: ${tokens.colors.interactive.table__cell__fill_hover.rgba};
}
&:focus {
outline: 2px dashed rgba(0, 112, 121, 1);
}
${({ $focused }) => $focused && `outline: 2px dashed rgba(0, 112, 121, 1);`}
${({ $selected }) =>
$selected &&
Expand Down Expand Up @@ -105,6 +105,7 @@ export function CalendarCell({
isDisabled,
isUnavailable,
formattedDate,
isFocused,
} = useCalendarCell({ date }, state, ref)

/**
Expand Down Expand Up @@ -157,6 +158,7 @@ export function CalendarCell({
$highlight={isHighlight}
$disabled={isDisabled || isUnavailable}
$density={density}
$focused={isFocused}
>
{formattedDate}
</StyledCell>
Expand Down

0 comments on commit c461e8f

Please sign in to comment.