Skip to content

Commit 1c0fa1c

Browse files
committed
chore: rename container prop to cssContainer
1 parent 30d7ef4 commit 1c0fa1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ const Toaster = React.forwardRef<HTMLElement, ToasterProps>(function Toaster(pro
618618
gap = GAP,
619619
icons,
620620
containerAriaLabel = 'Notifications',
621-
container,
621+
cssContainer,
622622
} = props;
623623
const [toasts, setToasts] = React.useState<ToastT[]>([]);
624624
const possiblePositions = React.useMemo(() => {
@@ -656,9 +656,9 @@ const Toaster = React.forwardRef<HTMLElement, ToasterProps>(function Toaster(pro
656656

657657
React.useEffect(() => {
658658
if (typeof document !== 'undefined') {
659-
insertCSS(container ?? document.body, globalStyle);
659+
insertCSS(cssContainer ?? document.body, globalStyle);
660660
}
661-
}, [container]);
661+
}, [cssContainer]);
662662

663663
React.useEffect(() => {
664664
return ToastState.subscribe((toast) => {

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export interface ToasterProps {
142142
swipeDirections?: SwipeDirection[];
143143
icons?: ToastIcons;
144144
containerAriaLabel?: string;
145-
container?: HTMLElement | null;
145+
cssContainer?: HTMLElement | null;
146146
}
147147

148148
export type SwipeDirection = 'top' | 'right' | 'bottom' | 'left';

0 commit comments

Comments
 (0)