Skip to content

Commit

Permalink
fix: add official support for lists in Callout
Browse files Browse the repository at this point in the history
  • Loading branch information
benlister-okta committed Mar 20, 2024
1 parent f1140e0 commit 63d3175
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/odyssey-react-mui/src/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const calloutSeverityValues = [

export type CalloutProps = {
/**
* @deprecated Callout content shuold be set via title, text, linkText, and linkUrl
* Used to optionally pass a text list to the component
*/
children?: ReactNode;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const storybookMeta: Meta<CalloutProps> = {
},
text: {
control: "text",
description: "The text content of the Callout",
description: "The content of the Callout",
table: {
type: {
summary: "string",
Expand Down Expand Up @@ -145,6 +145,24 @@ export const WithLink: StoryObj<CalloutProps> = {
},
};

export const ChildrenWithList: StoryObj<CalloutProps> = {
args: {
role: "status",
severity: "info",
title: "Delivery details needed to complete your user profile",
text: undefined,
children: (
<>
<ul>
<li>Secondary email</li>
<li>Street address</li>
<li>City</li>
</ul>
</>
),
},
};

export const ChildrenWithLink: StoryObj<CalloutProps> = {
args: {
role: "alert",
Expand Down

0 comments on commit 63d3175

Please sign in to comment.