Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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'}),
render: (
{
action = MDCSnackbarFoundation.strings.REASON_ACTION,
...rest
}: SnackbarActionProps,
ref: React.Ref,
Tag: any
) => {
return ;
}
});