Type alias SnackbarProps

SnackbarProps: PropsWithChildren<{
    ContentProps?: SnackbarContentProps;
    anchorOrigin?: AnchorOrigin;
    autoHideDuration?: number;
    className?: string;
    id?: string;
    isOpen?: boolean;
    onClose?: ((event, reason) => void);
}>

Type declaration

  • Optional ContentProps?: SnackbarContentProps

    Props applied to the SnackbarContent element.

  • Optional anchorOrigin?: AnchorOrigin

    The anchor of the Snackbar. The horizontal alignment is ignored.

    Default

    { vertical: 'bottom', horizontal: 'left' }
    
  • Optional autoHideDuration?: number

    The number of milliseconds to wait before automatically calling onClose()

    Default

    undefined
    
  • Optional className?: string

    Additional css classes to help with unique styling of the snackbar, external

  • Optional id?: string

    Optional unique identifier

  • Optional isOpen?: boolean

    If true, the component is shown

    Default

    false
    
  • Optional onClose?: ((event, reason) => void)

    Optional, used to control the open prop event: Event | SyntheticEvent<Element, Event>, reason: string

      • (event, reason): void
      • Parameters

        • event: Event | SyntheticEvent<Element, Event>
        • reason: CloseReason

        Returns void