const ButtonStyle = styled(Button)<{hogeProps:boolean}>` color: ${props => props.hogeProps ? 'trueの時の処理' : 'falseの時の処理'}; `; この例ではhogePropsという名前のpropsをButtonStyleコンポーネントに渡している。 Styled-Component内で、三項演算子を使ってhogePropsがtrueの場合とfalseの場合で異なるスタイルを適用している。 ついでに位置を動的に設定するModalContentStyleコンポーネントを作成する方法もば。 位置を動的に設定するModalContentStyleコンポーネントの作成