I want this using jss styling.
.a{
height: 20px;
}
.b{
height: 40px;
}
.a,.b{
width: 100px;
}
Try 1
Make a rule c
and add the class to both a
and b
c: {
width: '100px'
}
Try 2
Make a object common
and merge them to both a
and b
rule
const common = {
width: '100px',
};
a: {
height: '20px',
...common
}
b: {
height: '40px',
...common
}
Is there any better way possible ?