The width property is not functioning as expected for me, it seems to have no effect and I am unsure why this is happening. Even though I have set the width to 100%, it only takes on the default value. However, I have found that I can achieve full width by using the minWidth property instead. Currently, I am working with material-ui version: 0.18.7. To apply a custom width, you will need to override the minWidth value. Please refer to the example below:
import Snackbar from 'material-ui/Snackbar';
const bodyStyle = {
border: `2px solid ${config.actualWhite}`,
height:55,
minWidth: 1385,
background: config.snackbarColor,
fontFamily: config.fontFamily,
fontStyle: config.fontStyle,
fontWeight: config.fontWeight,
fontSize: config.fontSize,
borderBottomRightRadius: 46,
borderBottomLeftRadius: 46
}
<Snackbar
open={this.state.open}
message={this.state.error}
autoHideDuration={4000}
bodyStyle={bodyStyle}
action="Close"
onRequestClose={this.handleRequestClose}
onActionTouchTap={this.handleRequestClose}
style={myTheme.snackbarfromTop}
/>