forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(grid): add full width grid modifier (carbon-design-system#207)
* feat: added fluid spacing token * docs: updated demo with fluid spacing * feat: added grid--full-width modifier * docs: updated demos to reflect new changes to grid
- Loading branch information
Showing
10 changed files
with
189 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import { Grid, Row, Column } from './Grid'; | ||
import Main from './Main'; | ||
import ExampleContent from './ExampleContent'; | ||
|
||
export default function BasicUsage() { | ||
return ( | ||
<Main> | ||
<div class="bx--fluid-grid"> | ||
<Row> | ||
<Column breakpoint="md" span={4}> | ||
<h1>Fluid example</h1> | ||
<p> | ||
This example showcases the percentage based container and how it | ||
behaves responsively before maxing out at the largest breakpoint. | ||
</p> | ||
</Column> | ||
</Row> | ||
<ExampleContent /> | ||
</div> | ||
</Main> | ||
); | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
import React from 'react'; | ||
import { Grid, Row, Column } from './Grid'; | ||
import Main from './Main'; | ||
import ExampleContent from './ExampleContent'; | ||
|
||
export default function BasicUsage() { | ||
return ( | ||
<Main> | ||
<div class="bx--fluid-grid bx--grid--full-width"> | ||
<Row> | ||
<Column breakpoint="md" span={4}> | ||
<h1>Full width example</h1> | ||
</Column> | ||
</Row> | ||
<Row> | ||
<Column breakpoint="md" span={4}> | ||
<p> | ||
This example showcases the full width modifier on the fluid grid. | ||
</p> | ||
</Column> | ||
</Row> | ||
<Row> | ||
<Column breakpoint="md" span={4}> | ||
<h2> | ||
Small{' '} | ||
<span style={{ fontSize: '14px' }}>(4 columns @ 320px)</span> | ||
</h2> | ||
</Column> | ||
</Row> | ||
<Row> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
</Row> | ||
</div> | ||
<div class="bx--grid bx--grid--full-width"> | ||
<Row> | ||
<Column breakpoint="md" span={4}> | ||
<p> | ||
This example showcases the full width modifier on the basic grid. | ||
</p> | ||
</Column> | ||
</Row> | ||
<Row> | ||
<Column breakpoint="md" span={4}> | ||
<h2> | ||
Small{' '} | ||
<span style={{ fontSize: '14px' }}>(4 columns @ 320px)</span> | ||
</h2> | ||
</Column> | ||
</Row> | ||
<Row> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
<Column breakpoint="sm" span={1}> | ||
<div class="outside"> | ||
<div class="inside">1</div> | ||
</div> | ||
</Column> | ||
</Row> | ||
</div> | ||
</Main> | ||
); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ h6 { | |
outline: 1px dashed #97c1ff; | ||
} | ||
|
||
.bx--fluid-grid, | ||
.bx--grid { | ||
outline: 1px dashed #97c1ff; | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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