Skip to content

Commit

Permalink
Docs(web,web-react,web-twig): Switch Grid spacing tokens to new values
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Aug 19, 2024
1 parent ba8b18f commit a7562ea
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Grid from '../Grid';
import GridItemFactory from './GridItemFactory';

const GridCustomSpacing = () => (
<Grid cols={{ mobile: 2, tablet: 3, desktop: 4 }} spacing="space-1000">
<Grid cols={{ mobile: 2, tablet: 3, desktop: 4 }} spacing="space-1200">
<GridItemFactory items={4} label="1/2, 1/3, 1/4" />
</Grid>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import GridItem from '../GridItem';
const GridNestedGridItem = () => (
<Grid>
<GridItem columnStart={1} columnEnd={{ mobile: 9, tablet: 10 }}>
<div className="bg-cover py-400">
<div className="bg-cover py-500">
<Grid>
<GridItem columnStart={1} columnEnd="span 4">
<DocsBox size="small">First Nested Content</DocsBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const GridResponsiveCustomHorizontalSpacing = () => (
cols={{ mobile: 2, tablet: 3, desktop: 4 }}
spacingX={{
mobile: 'space-100',
tablet: 'space-400',
desktop: 'space-900',
tablet: 'space-500',
desktop: 'space-1100',
}}
>
<GridItemFactory items={4} label="1/2, 1/3, 1/4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ const GridResponsiveCustomSpacing = () => (
<Grid
cols={{ mobile: 2, tablet: 3, desktop: 4 }}
spacingX={{
mobile: 'space-1000',
tablet: 'space-900',
desktop: 'space-1200',
mobile: 'space-1200',
tablet: 'space-1100',
desktop: 'space-1600',
}}
spacingY={{
mobile: 'space-800',
tablet: 'space-1000',
mobile: 'space-1000',
tablet: 'space-1200',
desktop: 'space-0',
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const GridResponsiveCustomVerticalSpacing = () => (
cols={{ mobile: 2, tablet: 3, desktop: 4 }}
spacingY={{
mobile: 'space-100',
tablet: 'space-400',
desktop: 'space-900',
tablet: 'space-500',
desktop: 'space-1100',
}}
>
<GridItemFactory items={8} label="1/2, 1/3, 1/4" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Grid cols="4" spacing="space-1000">
<Grid cols="4" spacing="space-1200">
{% for i in 1..4 %}
<DocsBox size="small">1/2, 1/3, 1/4</DocsBox>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Grid>
<GridItem columnStart="1" columnEnd="{{ { mobile: 9, tablet: 10 } }}">
<div class="bg-cover py-400">
<div class="bg-cover py-500">
<Grid>
<GridItem columnStart="1" columnEnd="span 4">
<DocsBox size="small">First Nested Content</DocsBox>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Grid cols="{{ { mobile: 2, tablet: 3, desktop: 4 } }}" spacingX="{{ { mobile: 'space-100', tablet: 'space-400', desktop: 'space-900' } }}">
<Grid cols="{{ { mobile: 2, tablet: 3, desktop: 4 } }}" spacingX="{{ { mobile: 'space-100', tablet: 'space-500', desktop: 'space-1100' } }}">
{% for i in 1..4 %}
<DocsBox size="small">1/2, 1/3, 1/4</DocsBox>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Grid
cols="{{ { mobile: 2, tablet: 3, desktop: 4 } }}"
spacingX="{{ { mobile: 'space-1000', tablet: 'space-900', desktop: 'space-1200' } }}"
spacingY="{{ { mobile: 'space-800', tablet: 'space-1000', desktop: 'space-0' } }}"
spacingX="{{ { mobile: 'space-1200', tablet: 'space-1100', desktop: 'space-1600' } }}"
spacingY="{{ { mobile: 'space-1000', tablet: 'space-1200', desktop: 'space-0' } }}"
>
{% for i in 1..4 %}
<DocsBox size="small">1/2, 1/3, 1/4</DocsBox>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Grid cols="{{ { mobile: 2, tablet: 3, desktop: 4 } }}" spacingY="{{ { mobile: 'space-100', tablet: 'space-400', desktop: 'space-900' } }}">
<Grid cols="{{ { mobile: 2, tablet: 3, desktop: 4 } }}" spacingY="{{ { mobile: 'space-100', tablet: 'space-500', desktop: 'space-1100' } }}">
{% for i in 1..8 %}
<DocsBox size="small">1/2, 1/3, 1/4</DocsBox>
{% endfor %}
Expand Down
24 changes: 12 additions & 12 deletions packages/web/src/scss/components/Grid/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ <h2 class="docs-Heading">Custom Spacing</h2>
<div
class="Grid Grid--cols-2 Grid--tablet--cols-3 Grid--desktop--cols-4"
style="
--grid-spacing-x: var(--spirit-space-1000);
--grid-spacing-y: var(--spirit-space-1000);
--grid-spacing-x: var(--spirit-space-1200);
--grid-spacing-y: var(--spirit-space-1200);
"
>
<div class="docs-Box docs-Box--small">1/2, 1/3, 1/4</div>
Expand All @@ -96,11 +96,11 @@ <h2 class="docs-Heading">Responsive Custom Spacing</h2>
<div
class="Grid Grid--cols-2 Grid--tablet--cols-3 Grid--desktop--cols-4"
style="
--grid-spacing-x: var(--spirit-space-1000);
--grid-spacing-x-tablet: var(--spirit-space-900);
--grid-spacing-x-desktop: var(--spirit-space-1200);
--grid-spacing-y: var(--spirit-space-800);
--grid-spacing-y-tablet: var(--spirit-space-1000);
--grid-spacing-x: var(--spirit-space-1200);
--grid-spacing-x-tablet: var(--spirit-space-1100);
--grid-spacing-x-desktop: var(--spirit-space-1600);
--grid-spacing-y: var(--spirit-space-1000);
--grid-spacing-y-tablet: var(--spirit-space-1200);
--grid-spacing-y-desktop: var(--spirit-space-0);
"
>
Expand All @@ -121,8 +121,8 @@ <h2 class="docs-Heading">Responsive Custom Horizontal Spacing</h2>
class="Grid Grid--cols-2 Grid--tablet--cols-3 Grid--desktop--cols-4"
style="
--grid-spacing-x: var(--spirit-space-100);
--grid-spacing-x-tablet: var(--spirit-space-400);
--grid-spacing-x-desktop: var(--spirit-space-900);
--grid-spacing-x-tablet: var(--spirit-space-500);
--grid-spacing-x-desktop: var(--spirit-space-1100);
"
>
<div class="docs-Box docs-Box--small">1/2, 1/3, 1/4</div>
Expand All @@ -142,8 +142,8 @@ <h2 class="docs-Heading">Responsive Custom Vertical Spacing</h2>
class="Grid Grid--cols-2 Grid--tablet--cols-3 Grid--desktop--cols-4"
style="
--grid-spacing-y: var(--spirit-space-100);
--grid-spacing-y-tablet: var(--spirit-space-400);
--grid-spacing-y-desktop: var(--spirit-space-900);
--grid-spacing-y-tablet: var(--spirit-space-500);
--grid-spacing-y-desktop: var(--spirit-space-1100);
"
>
<div class="docs-Box docs-Box--small">1/2, 1/3, 1/4</div>
Expand Down Expand Up @@ -239,7 +239,7 @@ <h2 class="docs-Heading">Nested Grid with Grid Item</h2>
--grid-item-column-end-tablet: 10;
"
>
<div class="bg-cover py-400">
<div class="bg-cover py-500">
<div class="Grid">
<div
class="GridItem"
Expand Down

0 comments on commit a7562ea

Please sign in to comment.