Last active
August 22, 2018 07:46
-
-
Save Chun-Lin/c13ff440e9f67562036b88a026bdcc39 to your computer and use it in GitHub Desktop.
This is the component adding new css classes to adjust the style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import './content.css' | |
export default ({ skyblue }) => { | |
/* add new css classes */ | |
let titleStyles = ['content__title'] | |
if (skyblue) { | |
titleStyles.push('content--skyblue') | |
} | |
return ( | |
<div className="content"> | |
<div className="content__img" /> | |
<div className="content__info"> | |
<div className={titleStyles.join(' ')}>Cute Puppy</div> | |
<div className="content__description"> | |
Sed ut voluptatem neque cumque. Qui sed ut itaque est doloribus qui. | |
Eos perferendis autem qui fugiat. | |
</div> | |
</div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment