diff --git a/src/components/Toast/Toast.tsx b/src/components/Toast/Toast.tsx index d5ef2c49..27a5f085 100644 --- a/src/components/Toast/Toast.tsx +++ b/src/components/Toast/Toast.tsx @@ -13,9 +13,10 @@ export const ToastContext = createContext({ export type ToastAlignment = "start" | "end"; export type ToastType = "danger" | "warning" | "default" | "success"; -export interface ToastProps { +export interface ToastProps extends Omit { id?: string; type?: ToastType; + toastType?: "foreground" | "background"; title: string; description?: ReactNode; /** Time in milliseconds the toast will be visible */ @@ -128,11 +129,14 @@ const Title = styled.div` export const Toast = ({ type, + toastType = "foreground", title, description, actions = [], duration, onClose, + + ...props }: ToastProps & { onClose: (open: boolean) => void }) => { let iconName = ""; if (type === "default") { @@ -146,6 +150,8 @@ export const Toast = ({ {iconName.length > 0 && (