Skip to content

Instantly share code, notes, and snippets.

@kitze
Created October 22, 2017 20:00
Show Gist options
  • Save kitze/c92f49727f6208b328c9ef87a4d43386 to your computer and use it in GitHub Desktop.
Save kitze/c92f49727f6208b328c9ef87a4d43386 to your computer and use it in GitHub Desktop.
flex helpers
export 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