@material-ui/core#SnackbarContentProps TypeScript Examples

The following examples show how to use @material-ui/core#SnackbarContentProps. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Snackbar.tsx    From anchor-web-app with Apache License 2.0 6 votes vote down vote up
SnackbarContent: ComponentType<SnackbarContentProps> = styled(
  MuiSnackbarContent,
)`
  && {
    border-radius: 5px;

    .MuiButton-label,
    .MuiIconButton-label {
      opacity: 0.6;
    }
  }
`
Example #2
Source File: Snackbar.stories.tsx    From anchor-web-app with Apache License 2.0 6 votes vote down vote up
ActionSnackbar = styled(
  ({
    close,
    ...props
  }: SnackbarContentProps & {
    close?: () => void;
  }) => {
    return (
      <MuiSnackbarContent
        {...props}
        action={[
          <IconButton
            key="close"
            aria-label="close"
            color="inherit"
            onClick={close}
          >
            <Close />
          </IconButton>,
        ]}
      />
    );
  },
)``
Example #3
Source File: Snackbar.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
NormalSnackbarContent: ComponentType<SnackbarContentProps> = styled(
  SnackbarContent,
)`
  && {
    background-color: ${({ theme }) => theme.snackbar.normal.backgroundColor};
    color: ${({ theme }) => theme.snackbar.normal.textColor};
  }
`
Example #4
Source File: Snackbar.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
SuccessSnackbarContent: ComponentType<SnackbarContentProps> = styled(
  SnackbarContent,
)`
  && {
    background-color: ${({ theme }) => theme.snackbar.success.backgroundColor};
    color: ${({ theme }) => theme.snackbar.success.textColor};
  }
`
Example #5
Source File: Snackbar.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
WarningSnackbarContent: ComponentType<SnackbarContentProps> = styled(
  SnackbarContent,
)`
  && {
    background-color: ${({ theme }) => theme.snackbar.warning.backgroundColor};
    color: ${({ theme }) => theme.snackbar.warning.textColor};
  }
`
Example #6
Source File: Snackbar.tsx    From anchor-web-app with Apache License 2.0 5 votes vote down vote up
ErrorSnackbarContent: ComponentType<SnackbarContentProps> = styled(
  SnackbarContent,
)`
  && {
    background-color: ${({ theme }) => theme.snackbar.error.backgroundColor};
    color: ${({ theme }) => theme.snackbar.error.textColor};
  }
`