Created
May 15, 2017 22:49
-
-
Save kitze/4f94a51c2a52d260458c27b9e740ab25 to your computer and use it in GitHub Desktop.
flex helpers
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 flex = { | |
horizontal: { | |
display: 'flex', | |
flexDirection: 'row' | |
}, | |
vertical: { | |
display: 'flex', | |
flexDirection: 'column' | |
}, | |
flexWrap: { | |
display: 'flex', | |
flexWrap: 'wrap' | |
}, | |
centerHorizontal: { | |
justifyContent: 'center', | |
alignItems: 'center' | |
}, | |
wrap: { | |
flexWrap: 'wrap' | |
}, | |
centerHorizontalH: { | |
justifyContent: 'center' | |
}, | |
centerHorizontalV: { | |
alignItems: 'center' | |
}, | |
centerVertical: { | |
alignItems: 'center', | |
justifyContent: 'center' | |
}, | |
centerVerticalH: { | |
alignItems: 'center' | |
}, | |
centerVerticalV: { | |
justifyContent: 'center' | |
}, | |
spaceAround: { | |
justifyContent: 'space-around' | |
}, | |
spaceBetween: { | |
justifyContent: 'space-between' | |
}, | |
justifyEnd: { | |
justifyContent: 'flex-end' | |
} | |
}; | |
export default flex; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment