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 f7de7ca
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 @@ -2,7 +2,6 @@

import React from 'react';
import ReactDOM from 'react-dom';

import { getAsset, Loader } from './assets';
import { useIsDocumentHidden } from './hooks';
import { toast, ToastState } from './state';
Expand Down Expand Up @@ -428,7 +427,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 @@ -747,3 +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';

0 comments on commit f7de7ca

Please sign in to comment.