Open cslim0527 opened 11 months ago
antd, mui 같은 UI Library 사용 시 styled-components 적용 방법을 찾지 못하셨다고 하여 리뷰 드립니다.
<div id="todo-layout"> //...
<TodoContainer> //...
// styled-component 사용부분 <ThemeChangeButton onClick={handleToggleDarkMode} $isDarkMode={isDarkMode.toString()} > <BgColorsOutlined /> </ThemeChangeButton> // styled-component 정의 부분 const ThemeChangeButton = styled(Button)` border: none; padding: 5px 10px; ${({ $isDarkMode }) => css` color: ${$isDarkMode === "true" ? "#fff" : "inherit"}; background-color: ${$isDarkMode === "true" ? "#1a1c35" : "#fff"}; `} `;
앗.. 제것 같은 경우에는 styled(Button) 요부분에서 antd Button으로 인식하지 못하는 문제가 있었는데, 한번 다시 확인해보겠습니다! 감사합니다
antd, mui 같은 UI Library 사용 시 styled-components 적용 방법을 찾지 못하셨다고 하여 리뷰 드립니다.