DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
conditionally changing styled components based on props
const Text = styled.p` color: ${(props) => (props.red ? 'red' : 'blue')}; `
Source by malcoded.com #
PREVIOUS
NEXT
Tagged:
#conditionally
#changing
#styled
#components
#based
#props
ADD COMMENT
Topic
COMMENT
Name
1+8 =
Submit