Skip to content

Instantly share code, notes, and snippets.

@kitze
Created May 15, 2017 22:49
Show Gist options
  • Save kitze/4f94a51c2a52d260458c27b9e740ab25 to your computer and use it in GitHub Desktop.
Save kitze/4f94a51c2a52d260458c27b9e740ab25 to your computer and use it in GitHub Desktop.
flex helpers
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