예시 코드
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
'라이브러리 > MUI' 카테고리의 다른 글
[MUI] 스타일 프롭스 추가 | shouldForwardProp 사용방법 (0) | 2025.04.22 |
---|---|
[Next.js + MUI + Emotion] Received true for a non-boolean attribute $preview 오류 해결기 (0) | 2025.04.22 |
[MUI] 캘린더 달력 한국 시간으로 변경하기 (0) | 2025.04.17 |
[MUI] <SwipeableTemporaryDrawer/> 전역 상태로 상태 관리 방법 feat.예시코드 (0) | 2025.04.15 |
[MUI] <TextField/> 포커싱 아닐 때도 테두리 메인 색상 적용하기 (0) | 2025.04.12 |