Skip to content

An opinionated toast component for React.

fix: missing exported types (#459)

Alex McGovern9c2591d96cfb
diff --git a/src/index.tsx b/src/index.tsx
index e004459..10d9a50 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -747,3 +747,4 @@ const Toaster = (props: ToasterProps) => {
);
};
export { toast, Toaster, type ExternalToast, type ToastT, type ToasterProps, useSonner };
+export { type ToastClassnames, type ToastToDismiss, type Action } from './types';
diff --git a/src/types.ts b/src/types.ts
index b654ffe..b3f1c43 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -45,7 +45,7 @@ export interface ToastIcons {
loading?: React.ReactNode;
}
-interface Action {
+export interface Action {
label: React.ReactNode;
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
actionButtonStyle?: React.CSSProperties;