is there way to extend style on reactjs I tried extend style but its dosent work
cellItem:{
color: \"black\",
fontWeight: \"bold\",
[theme.breakp
You can just use JavaScript features for this:
const styles = theme => {
const cellItem = {
color: "black",
fontWeight: "bold",
[theme.breakpoints.down("xs")]: {
fontSize: "0.8em"
}
};
return {
cellItem,
tableCellItem: {
...cellItem,
fontSize: "1.5em"
},
tableCellItemInSingleScreen: {
...cellItem,
fontSize: "2.5em"
}
};
};
There is an extend plugin within JSS that would cause your syntax to work, but it is not one of the plugins included within Material-UI by default, but you can add that plugin.
Related answer: Advanced styling in material-ui