diff --git a/services/ui-src/src/components/alerts/Alert.tsx b/services/ui-src/src/components/alerts/Alert.tsx index 4f995435..6b7ecf8e 100644 --- a/services/ui-src/src/components/alerts/Alert.tsx +++ b/services/ui-src/src/components/alerts/Alert.tsx @@ -15,20 +15,20 @@ import { ReactNode } from "react"; export const Alert = ({ status = AlertTypes.INFO, + sx: sxOverride, + className, + showIcon = true, + icon, title, children, link, - showIcon = true, - icon, - ...props }: Props) => { return ( {showIcon && ( @@ -56,13 +56,13 @@ export const Alert = ({ interface Props { status?: AlertTypes; - title?: string; - link?: string; + sx?: CSSObject; showIcon?: boolean; icon?: string; - children?: ReactNode; + title?: string; className?: string; - sx?: CSSObject; + children?: ReactNode; + link?: string; } const sx = { diff --git a/services/ui-src/src/components/alerts/ErrorAlert.tsx b/services/ui-src/src/components/alerts/ErrorAlert.tsx index 99249142..0371a282 100644 --- a/services/ui-src/src/components/alerts/ErrorAlert.tsx +++ b/services/ui-src/src/components/alerts/ErrorAlert.tsx @@ -1,4 +1,4 @@ -import { Box, Collapse } from "@chakra-ui/react"; +import { Box, Collapse, CSSObject } from "@chakra-ui/react"; import { Alert } from "components"; import { useRef } from "react"; import { AlertTypes, ErrorVerbiage } from "types"; @@ -7,7 +7,7 @@ export const ErrorAlert = ({ error, variant = "inline", sxOverride, - ...props + alertSxOverride, }: Props) => { // Focus the alert when an error is given const ref = useRef(null); @@ -25,8 +25,7 @@ export const ErrorAlert = ({ title={error.title} showIcon={false} className={variant} - sx={sx.root} - {...props} + sx={alertSxOverride ?? sx.root} > {error.children} @@ -39,8 +38,8 @@ export const ErrorAlert = ({ interface Props { error?: ErrorVerbiage; variant?: "inline" | "toast"; - sxOverride?: any; - [key: string]: any; + sxOverride?: CSSObject; + alertSxOverride?: CSSObject; } const sx = { diff --git a/services/ui-src/src/components/banners/Banner.tsx b/services/ui-src/src/components/banners/Banner.tsx index 6d32d358..82a72fbf 100644 --- a/services/ui-src/src/components/banners/Banner.tsx +++ b/services/ui-src/src/components/banners/Banner.tsx @@ -1,12 +1,12 @@ import { Alert } from "components"; import { BannerData } from "types"; -export const Banner = ({ bannerData, ...props }: Props) => { +export const Banner = ({ bannerData }: Props) => { if (bannerData) { const { title, description, link } = bannerData; return ( bannerData && ( - + {description} ) diff --git a/services/ui-src/src/components/logins/LoginCognito.tsx b/services/ui-src/src/components/logins/LoginCognito.tsx index 5b40c19a..767c69f1 100644 --- a/services/ui-src/src/components/logins/LoginCognito.tsx +++ b/services/ui-src/src/components/logins/LoginCognito.tsx @@ -47,7 +47,7 @@ export const LoginCognito = () => { Log In with Cognito - +
handleLogin(event)}>