Skip to content

Commit

Permalink
Fikser tilgjengelighetsproblemer
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhein committed Nov 1, 2024
1 parent 0e95040 commit 1a6612d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/react/src/datepicker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ export type DateRangePickerProps = DayPickerProps & {
onSelect?: (range: DateRange | undefined) => void;
mode?: "range";
colorScheme?: "green" | "blue";
ariaLabel?: string;
showDropdownMonthYear?: boolean;
};

export const DateRangePicker = ({ showOutsideDays = true, ...props }: DateRangePickerProps) => {
export const DateRangePicker = ({ ...props }: DateRangePickerProps) => {
const uniqueClassName = generateUniqueClassName("kvib-datepicker");
const theme = useTheme();
const style = css(
uniqueClassName,
theme.colors[props.colorScheme ?? theme.components.Datepicker.defaultProps.colorScheme],
);
return (
<div {...(props.ariaLabel ? { "aria-label": props.ariaLabel } : {})}>
<>
<style>{style}</style>
<DayPicker
showOutsideDays={showOutsideDays}
classNames={{ root: uniqueClassName }}
locale={nb}
captionLayout={props.showDropdownMonthYear ? "dropdown" : "label"}
{...props}
mode="range"
/>
</div>
</>
);
};

Expand Down

0 comments on commit 1a6612d

Please sign in to comment.