Skip to content

Commit

Permalink
fix toast action button style applying
Browse files Browse the repository at this point in the history
  • Loading branch information
Владислав authored and Владислав committed Aug 21, 2024
1 parent 2b99cd8 commit a8cebaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ const Toast = (props: ToastProps) => {
<button
data-button
data-action
style={toast.actionButtonStyle || actionButtonStyle}
style={toast.actionButtonStyle || actionButtonStyle || toast.action?.actionButtonStyle}
onClick={(event) => {
// We need to check twice because typescript
if (!isAction(toast.action)) return;
Expand Down Expand Up @@ -746,4 +746,4 @@ const Toaster = (props: ToasterProps) => {
);
};
export { toast, Toaster, type ExternalToast, type ToastT, type ToasterProps, useSonner };
export { type ToastClassnames, type ToastToDismiss, type Action } from './types';
export { type ToastClassnames, type ToastToDismiss, type Action } from './types';

0 comments on commit a8cebaf

Please sign in to comment.