2019-07-10から1日間の記事一覧
styled-componentsでpropsから値を指定する styled-components でよくこういう書き方をすることがある。 const StyledInput = styled.input` padding: 20px; width: ${({width}) => width}; `; 以下のように props から width の値を伝搬して値を指定するこ…
styled-componentsでpropsから値を指定する styled-components でよくこういう書き方をすることがある。 const StyledInput = styled.input` padding: 20px; width: ${({width}) => width}; `; 以下のように props から width の値を伝搬して値を指定するこ…