Last active
December 2, 2018 20:17
-
-
Save kettanaito/096574b6355e2788abd315847a25e28e to your computer and use it in GitHub Desktop.
Medium - Atomic layout - Numeric - Custom
This file contains hidden or 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 Layout from 'atomic-layout' | |
Layout.configure({ | |
defaultUnit: 'rem' // append "rem" instead of "px" to all numeric values by default | |
}) | |
// rest of the App code here, such as ReactDOM.render() |
This file contains hidden or 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 { Composition } from 'atomic-layout' | |
const Header = () => ( | |
<Composition | |
gutter={2} // compiles to "2rem" of "grid-gap" | |
paddingVertical="14px" // compiles to "14px" explicitly | |
> | |
{/* children */} | |
</Composition> | |
) | |
export default Header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment