Declaring a nested CSS class in JSS takes the following form:
import {createUseStyles} from 'react-jss';
const styles = createUseStyles(() => ({
primaryCSSClass: {
color: 'black',
paddingLeft: '50px',
'& .nestedCSSClass': {
color: 'red',
}
}
}));
In your JSX you would apply the CSS classes as follows:
const MyComponent = () => {
const classes = useStyles();
return (
<div className={classes.primaryCSSClass}>
<p>Some text</p>
<div className="nestedCSSClass">
<p>Another text</p>
</div>
</div>
);
};