Skip to content

Commit

Permalink
update callouts to include icon attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
chdeskur committed Oct 4, 2024
1 parent 8b83cf9 commit beec2ba
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions packages/ui/app/src/mdx/components/callout/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,65 +101,65 @@ export const Callout: FC<PropsWithChildren<Callout.Props>> = ({ intent: intentRa

// aliases

export function InfoCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function InfoCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="info" title={title}>
<Callout intent="info" title={title} icon={icon}>
{children}
</Callout>
);
}

export function WarningCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function WarningCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="warning" title={title}>
<Callout intent="warning" title={title} icon={icon}>
{children}
</Callout>
);
}

export function SuccessCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function SuccessCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="success" title={title}>
<Callout intent="success" title={title} icon={icon}>
{children}
</Callout>
);
}

export function ErrorCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function ErrorCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="error" title={title}>
<Callout intent="error" title={title} icon={icon}>
{children}
</Callout>
);
}

export function NoteCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function NoteCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="note" title={title}>
<Callout intent="note" title={title} icon={icon}>
{children}
</Callout>
);
}

export function LaunchNoteCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function LaunchNoteCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="launch" title={title}>
<Callout intent="launch" title={title} icon={icon}>
{children}
</Callout>
);
}

export function TipCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function TipCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="tip" title={title}>
<Callout intent="tip" title={title} icon={icon}>
{children}
</Callout>
);
}

export function CheckCallout({ children, title }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
export function CheckCallout({ children, title, icon }: PropsWithChildren<Omit<Callout.Props, "intent">>): ReactElement {
return (
<Callout intent="check" title={title}>
<Callout intent="check" title={title} icon={icon}>
{children}
</Callout>
);
Expand Down

0 comments on commit beec2ba

Please sign in to comment.