Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
super(props);
const {timeoutMs, closeOnEscape, leading, stacked} = this.props;
const classes = new Set();
if (leading) {
classes.add('mdc-snackbar--leading');
}
if (stacked) {
classes.add('mdc-snackbar--stacked');
}
this.state = {
classes,
};
this.foundation = new MDCSnackbarFoundation(this.adapter);
if (timeoutMs) {
this.foundation.setTimeoutMs(timeoutMs);
}
if (closeOnEscape) {
this.foundation.setCloseOnEscape(closeOnEscape);
}
}
get adapter(): MDCSnackbarAdapter {