Skip to content

Commit

Permalink
[DS-379] Make heading optional in Popover (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
victortrinh2 authored Oct 18, 2024
1 parent fd1f5e7 commit 5b96aca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/angry-panthers-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@workleap/orbiter-ui": patch
---

Heading is now optional in Popover
2 changes: 1 addition & 1 deletion packages/components/src/popover/src/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,12 @@ export const Style: PopoverStory = {
</Popover>
)
};

export const NoHeading: PopoverStory = {
storyName: "no heading",
render: () => (
<Popover>
<Content>SpaceX designs, manufactures, and launches the world's most advanced rockets and spacecraft.</Content>
</Popover>
)
};

0 comments on commit 5b96aca

Please sign in to comment.