Skip to content

Commit f809fe3

Browse files
authoredMar 20, 2024
fix(core): increase default width of PT inline popovers (#5878)
* fix(core): increase default width of annotation popover * fix(core): increase default width of all inline object popovers * fix(core): remove width prop from annotation popover
1 parent 1d5f3cb commit f809fe3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎packages/sanity/src/core/form/inputs/PortableText/object/modals/ObjectEditModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function ObjectEditModal(props: {
4242
onClose()
4343
}, [onClose])
4444

45-
const modalWidth = schemaModalOption?.width || 1
45+
const modalWidth = schemaModalOption?.width
4646

4747
if (modalType === 'popover') {
4848
return (

‎packages/sanity/src/core/form/inputs/PortableText/object/modals/PopoverModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ interface PopoverEditDialogProps {
2525
const POPOVER_FALLBACK_PLACEMENTS: PopoverProps['fallbackPlacements'] = ['top', 'bottom']
2626

2727
export function PopoverEditDialog(props: PopoverEditDialogProps) {
28-
const {floatingBoundary, referenceBoundary, referenceElement, width = 0} = props
28+
const {floatingBoundary, referenceBoundary, referenceElement, width = 1} = props
2929
const [open, setOpen] = useState(false)
3030

3131
// This hook is here to set open after the initial render.

0 commit comments

Comments
 (0)
Please sign in to comment.