Skip to content

Commit

Permalink
fix(grid): Remove grid default attr
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Raider committed Feb 27, 2019
1 parent f9e8bfb commit c2a64f6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 43 deletions.
6 changes: 3 additions & 3 deletions packages/ray/lib/global/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ $grid-breakpoints: (
sm: 0px,
md: 600px,
lg: 1195px
) !default;
);

$container-max-widths: (
sm: 100%,
md: 100%,
lg: 1320px
) !default;
);

$container-gutters: (
sm: 1rem,
md: 3rem,
lg: 3.75rem
) !default;
);

@include _assert-ascending($grid-breakpoints, '$grid-breakpoints');
@include _assert-starts-at-zero($grid-breakpoints);
Expand Down
63 changes: 23 additions & 40 deletions packages/ray/stories/grid.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,29 @@ import { storiesOf } from '@storybook/react';
import { throttle, range } from 'lodash';
import withPadding from './util/withPadding';

class PageWidth extends React.Component {
state = {
width: window.innerWidth
};

componentDidMount() {
window.addEventListener(
'resize',
throttle(() => {
this.setState({ width: window.innerWidth });
}, 100)
);
}

render() {
return this.state.width;
}
}

storiesOf('Grid', module).addWithJSX('default', () => (
<div style={{ backgroundColor: 'hsl(144, 100%, 75%)' }}>
<div className="ray--container">
<div
className="ray--row"
style={{ backgroundColor: 'hsl(0, 100%, 75%)' }}
>
{range(12).map(n => (
<div className="ray--col-1">
<div
style={{
minHeight: '100vh',
paddingBottom: '100%',
backgroundColor: 'hsl(255, 100%, 75%)'
}}
>
{n + 1}
storiesOf('Grid', module)
.addWithJSX('default', () => (
<div style={{ backgroundColor: 'hsl(144, 100%, 75%)' }}>
<div className="ray--container">
<div
className="ray--row"
style={{ backgroundColor: 'hsl(0, 100%, 75%)' }}
>
{range(12).map(n => (
<div className="ray--col-1">
<div
style={{
minHeight: '100vh',
paddingBottom: '100%',
backgroundColor: 'hsl(255, 100%, 75%)'
}}
>
{n + 1}
</div>
</div>
</div>
))}
))}
</div>
</div>
</div>
</div>
));
))
.add('ray--container', () => <div className="ray--container">asdsads</div>);

0 comments on commit c2a64f6

Please sign in to comment.