diff --git a/packages/components/src/components/Alert.tsx b/packages/components/src/components/Alert.tsx index 4e1dc646..590b1cca 100644 --- a/packages/components/src/components/Alert.tsx +++ b/packages/components/src/components/Alert.tsx @@ -10,23 +10,32 @@ export const Alert: React.FC<{ backgroundColor: string; headingColor: string; bodyColor: string; - icon: React.ReactNode; - children: React.ReactNode; + icon: (props: React.ComponentProps<"svg">) => JSX.Element; + iconColor: string; + children?: React.ReactNode; }> = ({ heading = "Error", backgroundColor, headingColor, bodyColor, - icon, + icon: Icon, + iconColor, children, }) => { return (
-
{icon}
+
@@ -35,49 +44,42 @@ export const Alert: React.FC<{ export const ErrorAlert: React.FC<{ heading: string; - children: React.ReactNode; -}> = ({ heading = "Error", children }) => ( + children?: React.ReactNode; +}> = (props) => (