라이브러리/MUI
[MUI] 컴포넌트에 스타일 프롭스 추가하는 방법
순코딩
2025. 4. 22. 12:46
예시 코드
type NewStackProps = {
width: number
}
const NewStack = styled(Stack)<NewStackProps>(({ width }) => ({
width: width
}));
참고자료
Using 'styled()' MUI System utility with additional props (Typescript)
I'm working on a new project with MUI System v5. I'm using styled() utility here (not styled-components) to style and create simple UI components. The project is in TypeScript. I have a lot of
stackoverflow.com