An opinionated toast component for React.
Add close button prop to toast (#296)
Emil Kowalski790ce11753bb
diff --git a/src/index.tsx b/src/index.tsxindex d60f56b..08686ba 100644--- a/src/index.tsx+++ b/src/index.tsx@@ -295,7 +295,7 @@ const Toast = (props: ToastProps) => {}}}>- {closeButton && !toast.jsx ? (+ {(closeButton || toast.closeButton) && !toast.jsx ? (<buttonaria-label={closeButtonAriaLabel}data-disabled={disabled}diff --git a/src/types.ts b/src/types.tsindex eab1a96..f005616 100644--- a/src/types.ts+++ b/src/types.ts@@ -36,6 +36,7 @@ export interface ToastT {icon?: React.ReactNode;jsx?: React.ReactNode;invert?: boolean;+ closeButton?: boolean;dismissible?: boolean;description?: React.ReactNode;duration?: number;