Module

HeroUI.Toast

Package
purescript-yoga-heroui
Repository
rowtype-yoga/purescript-yoga-heroui

#ToastProps Source

type ToastProps :: Row Type -> Row Typetype ToastProps r = (className :: String, classNames :: Foreign, closeIcon :: JSX, color :: Color, description :: JSX, endContent :: JSX, hideCloseButton :: Boolean, hideIcon :: Boolean, icon :: JSX, loadingComponent :: JSX, onClose :: EffectFn1 Foreign Unit, promise :: Foreign, radius :: Radius, severity :: Color, shouldShowTimeoutProgress :: Boolean, timeout :: Int, title :: JSX, variant :: Variant | r)

#toast Source

toast :: forall givenProps nonDataProps kids. IsJSX kids => CoerceHeroProps (Record givenProps) (Record nonDataProps) (Record (ToastProps ())) => Record givenProps -> kids -> JSX

#ToastProviderProps Source

type ToastProviderProps :: Row Type -> Row Typetype ToastProviderProps r = (className :: String, disableAnimation :: Boolean, maxVisibleToasts :: Int, placement :: Placement, regionProps :: Foreign, toastOffset :: Int, toastProps :: Foreign | r)

#toastProvider Source

toastProvider :: forall givenProps nonDataProps kids. IsJSX kids => CoerceHeroProps (Record givenProps) (Record nonDataProps) (Record (ToastProviderProps ())) => Record givenProps -> kids -> JSX

#closeAllToastsImpl Source

#addToast Source

addToast :: forall givenProps nonDataProps. CoerceHeroProps (Record givenProps) (Record nonDataProps) (Record (ToastProps ())) => Record givenProps -> Effect (Maybe String)

Imperatively enqueue a toast. Returns the toast id, or Nothing if the queue rejected it (e.g. when no ToastProvider is mounted). https://heroui.com/docs/components/toast#api