From beec2baab6ea6b9d2aaab9a4f09e0f29d221d449 Mon Sep 17 00:00:00 2001 From: chdeskur Date: Fri, 4 Oct 2024 09:51:30 -0400 Subject: [PATCH 1/3] update callouts to include icon attribute --- .../src/mdx/components/callout/Callout.tsx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/ui/app/src/mdx/components/callout/Callout.tsx b/packages/ui/app/src/mdx/components/callout/Callout.tsx index 0b57dd2526..16fa5170bb 100644 --- a/packages/ui/app/src/mdx/components/callout/Callout.tsx +++ b/packages/ui/app/src/mdx/components/callout/Callout.tsx @@ -101,65 +101,65 @@ export const Callout: FC> = ({ intent: intentRa // aliases -export function InfoCallout({ children, title }: PropsWithChildren>): ReactElement { +export function InfoCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function WarningCallout({ children, title }: PropsWithChildren>): ReactElement { +export function WarningCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function SuccessCallout({ children, title }: PropsWithChildren>): ReactElement { +export function SuccessCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function ErrorCallout({ children, title }: PropsWithChildren>): ReactElement { +export function ErrorCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function NoteCallout({ children, title }: PropsWithChildren>): ReactElement { +export function NoteCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function LaunchNoteCallout({ children, title }: PropsWithChildren>): ReactElement { +export function LaunchNoteCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function TipCallout({ children, title }: PropsWithChildren>): ReactElement { +export function TipCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function CheckCallout({ children, title }: PropsWithChildren>): ReactElement { +export function CheckCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); From 1caa826f5c69929c68c3094786e073eeb914b887 Mon Sep 17 00:00:00 2001 From: chdeskur Date: Fri, 4 Oct 2024 09:57:39 -0400 Subject: [PATCH 2/3] formatting --- .../src/mdx/components/callout/Callout.tsx | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/packages/ui/app/src/mdx/components/callout/Callout.tsx b/packages/ui/app/src/mdx/components/callout/Callout.tsx index 16fa5170bb..0656e07d81 100644 --- a/packages/ui/app/src/mdx/components/callout/Callout.tsx +++ b/packages/ui/app/src/mdx/components/callout/Callout.tsx @@ -109,7 +109,11 @@ export function InfoCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function WarningCallout({ + children, + title, + icon, +}: PropsWithChildren>): ReactElement { return ( {children} @@ -117,7 +121,11 @@ export function WarningCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function SuccessCallout({ + children, + title, + icon, +}: PropsWithChildren>): ReactElement { return ( {children} @@ -125,7 +133,11 @@ export function SuccessCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function ErrorCallout({ + children, + title, + icon, +}: PropsWithChildren>): ReactElement { return ( {children} @@ -141,7 +153,11 @@ export function NoteCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function LaunchNoteCallout({ + children, + title, + icon, +}: PropsWithChildren>): ReactElement { return ( {children} @@ -157,7 +173,11 @@ export function TipCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function CheckCallout({ + children, + title, + icon, +}: PropsWithChildren>): ReactElement { return ( {children} From 0fe07b16cefa5e2264b5b1b5ddafc99d1795540d Mon Sep 17 00:00:00 2001 From: chdeskur Date: Fri, 4 Oct 2024 10:23:46 -0400 Subject: [PATCH 3/3] spread --- .../src/mdx/components/callout/Callout.tsx | 49 ++++++------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/packages/ui/app/src/mdx/components/callout/Callout.tsx b/packages/ui/app/src/mdx/components/callout/Callout.tsx index 0656e07d81..9aca15a1d3 100644 --- a/packages/ui/app/src/mdx/components/callout/Callout.tsx +++ b/packages/ui/app/src/mdx/components/callout/Callout.tsx @@ -101,53 +101,41 @@ export const Callout: FC> = ({ intent: intentRa // aliases -export function InfoCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function InfoCallout({ children, ...props }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function WarningCallout({ - children, - title, - icon, -}: PropsWithChildren>): ReactElement { +export function WarningCallout({ children, ...props }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function SuccessCallout({ - children, - title, - icon, -}: PropsWithChildren>): ReactElement { +export function SuccessCallout({ children, ...props }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function ErrorCallout({ - children, - title, - icon, -}: PropsWithChildren>): ReactElement { +export function ErrorCallout({ children, ...props }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function NoteCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function NoteCallout({ children, ...props }: PropsWithChildren>): ReactElement { return ( - + {children} ); @@ -155,31 +143,26 @@ export function NoteCallout({ children, title, icon }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function TipCallout({ children, title, icon }: PropsWithChildren>): ReactElement { +export function TipCallout({ children, ...props }: PropsWithChildren>): ReactElement { return ( - + {children} ); } -export function CheckCallout({ - children, - title, - icon, -}: PropsWithChildren>): ReactElement { +export function CheckCallout({ children, ...props }: PropsWithChildren>): ReactElement { return ( - + {children} );