How to use the @material/snackbar.MDCSnackbarFoundation.strings function in @material/snackbar

To help you get started, we’ve selected a few @material/snackbar 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 gutenye / react-mc / src / Snackbar / index.js View on Github external
import '@material/snackbar/dist/mdc.snackbar.css'
import React, { Component, PropTypes } from 'react'
import cx from 'classnames'
import { MDCSnackbarFoundation } from '@material/snackbar'
import * as helper from '../helper'

const {TRANS_END_EVENT_NAME} = MDCSnackbarFoundation.strings

class Snackbar extends Component {
  static propTypes = {}
  state = {
    rootClassName: [],
    ariaHidden: 'true',
    message: '',
    actionText: '',
    actionAriaHidden: 'true',
  }

  foundation = new MDCSnackbarFoundation({
    addClass: helper.addClass('rootClassName', this),
    removeClass: helper.removeClass('rootClassName', this),
    setAriaHidden: () => this.setState({ariaHidden: 'true'}),
    unsetAriaHidden: () => this.setState({ariaHidden: 'false'}),
github jamesmfriedman / rmwc / src / snackbar / snackbar.tsx View on Github external
render: (
    {
      action = MDCSnackbarFoundation.strings.REASON_ACTION,
      ...rest
    }: SnackbarActionProps,
    ref: React.Ref,
    Tag: any
  ) => {
    return ;
  }
});