Skip to content

Commit

Permalink
Pass through ButtonGroup props from DateSelectorButton
Browse files Browse the repository at this point in the history
This allows users of this component to set properties such as
onClick.
  • Loading branch information
lpsinger committed Oct 3, 2023
1 parent 93fdcde commit f60ea79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/routes/circulars._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,16 @@ function DateSelectorButton({
startDate,
endDate,
expanded,
...props
}: {
startDate?: string
endDate?: string
expanded?: boolean
}) {
} & Omit<Parameters<typeof ButtonGroup>[0], 'segmented' | 'children'>) {
const slimClasses = 'height-4 padding-y-0'

return (
<ButtonGroup type="segmented">
<ButtonGroup type="segmented" {...props}>
<Button type="button" className={`${slimClasses} padding-x-2`}>
{(startDate && dateSelectorLabels[startDate]) ||
(startDate && endDate && (
Expand Down

0 comments on commit f60ea79

Please sign in to comment.