Last active
January 18, 2019 14:22
-
-
Save robinweser/1bc88413b03d53b86bdd0668a05eddd1 to your computer and use it in GitHub Desktop.
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
.Header { | |
padding-left: 20px; | |
padding-right: 20px; | |
line-height: 1.5 | |
} | |
@media (min-width: 320px) { | |
.Header { | |
padding-left: 30px; | |
padding-right: 30px | |
} | |
} |
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 './Header.blu.css' | |
export default function Header({ size, color }) { | |
return { | |
_className: 'Header', | |
fontSize: size, | |
color, | |
'@media (min-width: 320px)': { | |
fontSize: size * 2 | |
} | |
} | |
} |
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
style Header { | |
paddingLeft: 20 | |
paddingRight: 20 | |
lineHeight: 1.5 | |
fontSize: $size | |
color: $color | |
[@viewportWidth>=320] { | |
fontSize: Math.multiply($size 2) | |
paddingLeft: 30 | |
paddingRight: 30 | |
} | |
} | |
style Button { | |
backgroundColor: rgb(90 180 90) | |
fontSize: 15 | |
borderRadius: 10 | |
[@hover] { | |
backgroundColor: Color.alpha(Color.darken(rgb(90 180 90) 20) 70) | |
} | |
} |
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 Header from './Header.blu.js' | |
import Button from './Button.blu.js' | |
export { | |
Header, | |
Button | |
} |
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 { useFela } from 'react-fela' | |
import { Header, Button } from './style.elo.js' | |
export default (props) => { | |
const css = useFela(props) | |
return ( | |
<div> | |
<h1 className={css(Header)}>Hello World</h1> | |
<button className={css(Button)}>Click Me</button> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment