New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@shortcm/react-snackbar

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shortcm/react-snackbar

Material Components React Snackbar

latest
Source
npmnpm
Version
0.8.3
Version published
Maintainers
1
Created
Source

React Button

A React version of an MDC Button.

Installation

npm install @material/react-snackbar

Usage

Styles

with Sass:

import '@material/react-snackbar/index.scss';

with CSS:

import '@material/react-snackbar/dist/snackbar.css';

Javascript Instantiation

import React from 'react';
import Button from '@material/react-snackbar';

class MyApp extends React.Component {
  render() {
    return (
      <Button>
        Click Me!
      </Button>
    );
  }
}

Props

Prop NameTypeDescription
messageStringMessage to show in the snackbar
classNameStringClasses to be applied to the root element.
timeoutMsNumberTimeout in milliseconds when to close snackbar.
closeOnEscapeBooleanCloses popup on "Esc" button if true.
actionTextStringText for action button
leadingBooleanShows snackbar on the left if true (or right for rtl languages)
stackedBooleanShows buttons under text if true
onBeforeOpenFunction() => voidCallback for handling event, which happens before opening
onOpenFunction(evt: Event) => voidCallback for handling event, which happens after opening
onBeforeCloseFunction() => voidCallback for handling event, which happens before closing
onCloseFunction() => voidCallback for handling event, which happens after closing

Sass Mixins

Sass mixins may be available to customize various aspects of the Components. Please refer to the MDC Web repository for more information on what mixins are available, and how to use them.

Advanced Sass Mixins

Usage with Icons

Please see our Best Practices doc when importing or using icon fonts.

Keywords

mdc web react

FAQs

Package last updated on 16 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts