styled-components
[CSS] CSS-in-JS์ Styled-Components ์ฌ์ฉ๋ฒ ๋ฐ ๋ฌธ๋ฒ ์ ๋ฆฌ
CSS-in-JS๋? ์๋ฐ์คํฌ๋ฆฝํธ ํ์ผ ์์์ CSS๋ฅผ ์์ฑํ ์ ์๋ ๋ฐฉ๋ฒ์ด๋ค. ์๋ฐ์คํฌ๋ฆฝํธ์ ์ํ ๊ฐ์ ๊ณต์ ํ์ฌ ๋์ ์ผ๋ก ์คํ์ผ๋ง์ ํ๊ธฐ ์ํด ๋ฑ์ฅํ ํจ๋ฌ๋ค์์ด๋ค. ์ธ๋ผ์ผ ์คํ์ผ ์ด์ฉ or ํด๋์ค ๋ช ์ผ๋ก ์กฐ๊ฑด๋ถ ์คํ์ผ๋ง props.[props ์์ฑ ์ด๋ฆ]} import styled from "styled-components"; const Father = styled.div` display: flex; `; const Box = styled.div` background-color: ${(props) => props.bgColor}; width: 100px; height: 100px; `; function App() { return ( ); } export default App; ์ด ๋ฌธ๋ฒ์ ํ์ฉํ๋ฉด ์ค๋ณต..