Skip to content

Commit

Permalink
fix(sanity): add prop for constraintSize (#7421)
Browse files Browse the repository at this point in the history
  • Loading branch information
RitaDias committed Aug 26, 2024
1 parent 6bd4f8c commit 17a7b1d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface DateTimeInputProps {
timeStep?: number
value?: Date
calendarLabels: CalendarLabels
constrainSize?: boolean
}

export const DateTimeInput = forwardRef(function DateTimeInput(
Expand All @@ -44,6 +45,7 @@ export const DateTimeInput = forwardRef(function DateTimeInput(
selectTime,
timeStep,
calendarLabels,
constrainSize = true,
...rest
} = props
const popoverRef = useRef<HTMLDivElement | null>(null)
Expand Down Expand Up @@ -103,7 +105,7 @@ export const DateTimeInput = forwardRef(function DateTimeInput(
// see https://github.com/sanity-io/design/issues/519
<LayerProvider zOffset={1000}>
<Popover
constrainSize
constrainSize={constrainSize}
data-testid="date-input-dialog"
portal
content={
Expand Down

0 comments on commit 17a7b1d

Please sign in to comment.