diff --git a/.changeset/angry-panthers-try.md b/.changeset/angry-panthers-try.md new file mode 100644 index 000000000..1ef49bd9d --- /dev/null +++ b/.changeset/angry-panthers-try.md @@ -0,0 +1,5 @@ +--- +"@workleap/orbiter-ui": patch +--- + +Heading is now optional in Popover diff --git a/packages/components/src/popover/src/Popover.tsx b/packages/components/src/popover/src/Popover.tsx index ba7731d57..26fd3f946 100644 --- a/packages/components/src/popover/src/Popover.tsx +++ b/packages/components/src/popover/src/Popover.tsx @@ -92,7 +92,7 @@ export function InnerPopover({ const { button, "button-group": buttonGroup, content, footer, heading } = useSlots(children, useMemo(() => ({ _: { - required: ["heading", "content"] + required: ["content"] }, button: { className: "o-ui-popover-button", diff --git a/packages/components/src/popover/tests/chromatic/Popover.stories.tsx b/packages/components/src/popover/tests/chromatic/Popover.stories.tsx index fdb58d08e..752ef43bb 100644 --- a/packages/components/src/popover/tests/chromatic/Popover.stories.tsx +++ b/packages/components/src/popover/tests/chromatic/Popover.stories.tsx @@ -207,3 +207,12 @@ export const Style: PopoverStory = { ) }; + +export const NoHeading: PopoverStory = { + storyName: "no heading", + render: () => ( + + SpaceX designs, manufactures, and launches the world's most advanced rockets and spacecraft. + + ) +};