How to use notistack - 10 common examples

To help you get started, we’ve selected a few notistack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github layer5io / meshery / ui / components / MesheryPerformanceComponent.js View on Github external
//     t: loadTest.get('t'),
  //     result: loadTest.get('result'),
  //   }
  // }
  const grafana = state.get("grafana").toJS();
  const prometheus = state.get("prometheus").toJS();
  const k8sConfig = state.get("k8sConfig").toJS();
  const staticPrometheusBoardConfig = state.get("staticPrometheusBoardConfig").toJS();
  return {...loadTest, grafana, prometheus, staticPrometheusBoardConfig, k8sConfig};
}


export default withStyles(styles)(connect(
  mapStateToProps,
  mapDispatchToProps
)(withSnackbar(MesheryPerformanceComponent)));
github linode / manager / packages / manager / src / features / Managed / Contacts / Contacts.tsx View on Github external
/>
        
         contact.id === selectedContactId)}
          groups={groups}
        />
      
    
  );
};

export default withSnackbar(Contacts);

/**
 * Generate groups from a list of Managed Contacts.
 *
 * @param contacts: Linode.ManagedContact[]
 * A list of contacts to generate groups from.
 */
export const generateGroupsFromContacts = (
  contacts: ManagedContact[]
): ManagedContactGroup[] => {
  const groups: ManagedContactGroup[] = [];

  contacts.forEach(contact => {
    // If the contact doesn't have a group, don't do anything. Otherwise we'd have `null` groups.
    if (typeof contact.group !== 'string') {
      return;
github xyfir / illuminsight / components / Edit.tsx View on Github external
export function Edit(): JSX.Element | null {
  const [language, setLanguage] = React.useState<
    Illuminsight.Pub['languages'][0]
  >('');
  const { enqueueSnackbar } = useSnackbar();
  const [cover, setCover] = React.useState();
  const [tags, setTags] = React.useState([]);
  const [pub, setPub] = React.useState(null);
  const [tag, setTag] = React.useState('');
  const history = useHistory();
  const classes = useStyles();
  const match = useRouteMatch();

  function onChange(prop: keyof Illuminsight.Pub, value: any): void {
    if (pub) setPub({ ...pub, [prop]: value });
  }

  function onResetBookmark(): void {
    onChange('bookmark', {
      element: 0,
      section: 0,
github viclafouch / PE-Center / src / js / containers / popup / Settings.jsx View on Github external
function Settings() {
  const { t } = useTranslation()
  const [{ productsSelected, lang, maxThreadsPerProduct, openLinkIn, displayNotifications }, dispatch] = useSettings()
  const [{ startPage }, defaultDispatch] = useContext(DefaultContext)
  const [theme, setTheme] = useTheme()
  const [products, setProducts] = useState([])
  const { enqueueSnackbar } = useSnackbar()

  useEffect(() => {
    ;(async () => {
      const localStorage = await getBrowserStorage('local')
      setProducts(localStorage.products)
      try {
        const response = await getAllProducts()
        const result = response.result.map(e => ({
          ...e,
          icon: `${e.name
            .toLowerCase()
            .split(' ')
            .join('-')}-64.png`
        }))
        if (JSON.stringify(localStorage.products) === JSON.stringify(result)) return
        setBrowserStorage('local', { products: result })
github backpulse / dashboard / src / pages / dashboard / Contact / index.js View on Github external
fullWidth
                        />
                    
                    {this.state.error && 
                        {this.state.errorMsg}
                    }
                    
                        <button color="primary" style="{{marginTop:">{strings.SAVE}</button>
                    
                }
            
        );
    }
}

export default withRouter(withSnackbar(Contact));
github apsavin / pgrights / src / hocs / withFetch.js View on Github external
const fetchProps = {
          [map.fetch]: this.fetch,
          [map.inProgress]: inProgress,
          [map.showLoader]: inProgress &amp;&amp; delayPassed,
        };

        return (
          
        );
      }
    }

    return withSnackbar(ProgressEventsHandler);
  };
github gnosis / safe-react / src / routes / safe / components / Settings / ManageOwners / ReplaceOwnerModal / index.jsx View on Github external
owners={owners}
            values={values}
            ownerAddress={ownerAddress}
            ownerName={ownerName}
            onClickBack={onClickBack}
            onSubmit={onReplaceOwner}
            threshold={threshold}
            safeAddress={safeAddress}
          /&gt;
        )}
      
    
  )
}

export default withStyles(styles)(withSnackbar(ReplaceOwner))

notistack

Highly customizable notification snackbars (toasts) that can be stacked on top of each other

MIT
Latest version published 1 year ago

Package Health Score

72 / 100
Full package analysis