Hello, I am in the process of creating a snackbar using material ui. The React version is 0.14, while the Material-ui version is 0.15.0.
Since I couldn't find anything suitable for this particular version of React, I opted to use material-ui. The snackbar works fine but it only opens at the bottom of the screen. Is there a way I can change its position? For instance, how can I make it appear at the top right?
Here's my code:
import Snackbar from 'material-ui/Snackbar';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
this.state = {
open: false,
};
handleTouchTap = () => {
this.setState({
open: true,
});
};
handleRequestClose = () => {
this.setState({
open: false,
});
};
<div>
<button
onClick={this.handleTouchTap}>
SHOW NOTIFICATION
<button>
<Snackbar
open={this.state.open}
message="Event added to your calendar"
autoHideDuration={4000}
onRequestClose={this.handleRequestClose}
/>
</div>
View the image here: [Notification image1