import * as React from "react"; import { toaster, ToasterContainer } from "baseui/toast"; import { Button, SIZE } from "baseui/button"; import { Block } from "baseui/block"; export default function Example() { const [count, setCount] = React.useState(0); return ( ); const showMore = ( ); const toastMethods = [ toaster.info, toaster.negative, toaster.positive, toaster.warning, ]; const toastMethod = toastMethods[count % 4]; toastKey = toastMethod.call( toaster, {msg} {showMore} , { key: "same-key", onClose: () => console.log("Toast closed."), overrides: { InnerContainer: { style: { width: "100%" }, }, }, }, ); }} > Show notification ); }