Skip to content

Commit

Permalink
fix: toastOption.style wasn't applied
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnartorfis committed Sep 19, 2024
1 parent c3ddc08 commit b13ea69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ export const Toast = React.forwardRef<ToastRef, ToastProps>(
className={cn(className, classNamesCtx?.toast, classNames?.toast)}
style={[
unstyled ? undefined : elevationStyle,
defaultStyles.toast,
toastStyleCtx,
styles?.toast,
style,
defaultStyles.toast,
wiggleAnimationStyle,
]}
entering={entering}
Expand Down
6 changes: 2 additions & 4 deletions src/toaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const ToasterUI: React.FC<ToasterProps> = ({
}
}, []);

const { style, className, unstyled } = toastOptions;
const { unstyled } = toastOptions;

const value = React.useMemo<ToasterContextType>(
() => ({
Expand Down Expand Up @@ -270,7 +270,7 @@ export const ToasterUI: React.FC<ToasterProps> = ({

return (
<ToastContext.Provider value={value}>
<Positioner className={className} style={style} position={position}>
<Positioner position={position}>
{positionedNonDynamicToasts.map((positionedToast) => {
return (
<Toast
Expand All @@ -285,8 +285,6 @@ export const ToasterUI: React.FC<ToasterProps> = ({
})}
</Positioner>
<Positioner
className={className}
style={style}
position={
positionedDynamicToasts?.[0]?.position ?? toastDefaultValues.position
}
Expand Down

0 comments on commit b13ea69

Please sign in to comment.