'Material UI: Style a styled component problem (TS)

Recently I started to work with styled components in MUI such as:

const customBaseComponent = styled(Button)`
color: red
css here
`

Styling native MUI comps is working perfectly, as desired. But then comes the nested styling... Now what I need is to style my customBaseComponent as below

const newStyledCustom = styled(customBaseComponent)`
color: blue
css here
`

Any css that was implemented in the first comp and now overriden is not being shown as desired (the overriden version)

Apart of this, tried most of the stuff that comes in the doc but frankly I don't know if either I'm not implementing it right or I don't understand it. Does this way work? Or I have to swap to makeStyles, withStyles.. and so on?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source