Last active
March 30, 2019 16:54
-
-
Save johnnyBira/e8550297649d40e5d21ba6ae5b5a19c3 to your computer and use it in GitHub Desktop.
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
... | |
const span = (cols) => ` | |
// calculate the width | |
width: ${cols / 12 * 100 }%; | |
` | |
const offset = (cols) => ` | |
// calculate the offset | |
margin: ${cols / 12 * 100 }%; | |
` | |
const order = (order) => ` | |
order: ${order}; | |
` | |
const hidden = (hidden = false) => ` | |
display: ${hidden ? 'none' : 'flex'}; | |
` | |
export const withResponsiveProps( | |
// Wrapped styled component | |
Column, | |
// Mixins | |
{ | |
span: span, | |
offset: offset, | |
order: order, | |
hidden: hidden | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment