Skip to content

Commit

Permalink
feat(atoms): add xl gap for grid layout
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed Aug 8, 2018
1 parent 2f82549 commit 015711d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/atoms/Grid/GridLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { createStyledTag, createTheme } from '../../utils';
type GridLayoutProps = {|
children?: React$Node,
/** possbile spaces between grid items */
gap?: 'xs' | 'md' | 'lg' | 'none',
gap?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none',
/** when true then set inline-grid */
inline?: boolean,
/** possible offsets of the grid layout */
offset?: 'xs' | 'md' | 'lg' | 'none',
offset?: 'sm' | 'md' | 'lg' | 'none',
/** justify-content css rule*/
justifyContent?: 'start' | 'end' | 'center' | 'stretch' | 'space-around' | 'space-between' | 'space-evenly',
/** align-content css rule*/
Expand All @@ -27,6 +27,9 @@ const theme = createTheme(name, {
modifiers: {
gap: {
xs: {
gridGap: '0.5rem',
},
sm: {
gridGap: '1rem',
},
md: {
Expand All @@ -35,10 +38,13 @@ const theme = createTheme(name, {
lg: {
gridGap: '2rem',
},
xl: {
gridGap: '3rem',
},
none: {},
},
padding: {
xs: {
sm: {
padding: '1rem',
},
md: {
Expand Down
2 changes: 1 addition & 1 deletion storybook/__tests__/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12651,7 +12651,7 @@ exports[`Storyshots MOLECULES/Rating with default modifiers 1`] = `
.emotion-4 {
display: inline-grid;
grid-auto-columns: min-content;
grid-gap: 1rem;
grid-gap: 0.5rem;
}
.emotion-1 {
Expand Down

0 comments on commit 015711d

Please sign in to comment.