How can I get vscode intellisense to work when customizing css in material-ui component?

Viewed 48

I was wondering if somebody could suggest a vscode extension that will allow intellisense to suggest css-in-js for customized material ui components in .tsx file. E.g. I would like intellisense to pop up with 'backgroundColor' when I start typing this. The closest I have come to achieving this is by using 'CSS-in-JS' extension by paulmolluzzo, however this only works for .js files.

The syntax I am using is as follows: (Container.tsx)

import {
  styled,
  Container as MuiContainer,
  ContainerProps,
} from '@mui/material'

const Container = styled(MuiContainer)<ContainerProps>(({ theme }) => ({
  '.MuiContainer-root': {
    padding: '10px',
    backgroundColor: 'red',
  },
}))

export default Container

Many thanks, Glen

1 Answers
Related