Skip to content

Commit

Permalink
fix: calendar style lint (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbien authored Jan 5, 2024
1 parent cf45bd0 commit cf28e03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
11 changes: 6 additions & 5 deletions packages/frosted-ui/src/components/calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
isolation: isolate;
}

.fui-CalendarGrid th {
.fui-CalendarGrid {
font-size: var(--font-size-2);
font-weight: var(--font-weight-regular);
color: var(--gray-a10);
Expand Down Expand Up @@ -72,7 +72,8 @@
.fui-CalendarGridCellInner[data-selection-state='range']::before {
border-radius: 0;
}
.fui-CalendarGridCellInner.selected + .fui-CalendarGridCellInner.selected {
.fui-CalendarGridCellInner.fui-CalendarGridCell-selected
+ .fui-CalendarGridCellInner.fui-CalendarGridCell-selected {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
Expand All @@ -90,7 +91,7 @@
border-bottom-right-radius: 6px;
}

.fui-CalendarGridCellInner.selected {
.fui-CalendarGridCellInner.fui-CalendarGridCell-selected {
background: var(--accent-9);
color: white;
}
Expand Down Expand Up @@ -122,7 +123,7 @@
border-bottom-right-radius: 0;
}

.fui-CalendarGridCellInner.focusRing:focus-visible:after {
.fui-CalendarGridCellInner.fui-CalendarGridCell-focusRing:focus-visible:after {
content: '';
position: absolute;
inset: 0px;
Expand All @@ -138,7 +139,7 @@
opacity: 0.6;
}

.fui-CalendarGridCellInner.unavailable {
.fui-CalendarGridCellInner.fui-CalendarGridCell-unavailable {
color: var(--danger-9);
text-decoration: line-through;
}
Expand Down
9 changes: 3 additions & 6 deletions packages/frosted-ui/src/components/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ function CalendarCell({
buttonProps,
formattedDate,
isSelected,
isDisabled,
isOutsideVisibleRange,
isUnavailable,
} = useCalendarCell(props, state, ref);
Expand Down Expand Up @@ -421,12 +420,10 @@ function CalendarCell({
isRoundedLeft ? 'left' : isRoundedRight ? 'right' : undefined
}
className={classNames('fui-CalendarGridCellInner', {
['selected']:
['fui-CalendarGridCell-selected']:
isSelectionStart || isSelectionEnd || isSingleDateSelected,
['range-selected']: !(isSelectionStart || isSelectionEnd),
['focusRing']: isFocused && isFocusVisible,
['disabled']: isDisabled,
['unavailable']: isUnavailable,
['fui-CalendarGridCell-focusRing']: isFocused && isFocusVisible,
['fui-CalendarGridCell-unavailable']: isUnavailable,
})}
>
{formattedDate}
Expand Down

0 comments on commit cf28e03

Please sign in to comment.