-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Feat(web-twig): Add alignmentX and alignmentY prop to Grid com…
…ponent #DS-1414
- Loading branch information
1 parent
859fd18
commit 085d34a
Showing
3 changed files
with
51 additions
and
29 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
47 changes: 26 additions & 21 deletions
47
packages/web-twig/src/Resources/components/Grid/stories/GridAlignment.twig
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 |
---|---|---|
@@ -1,35 +1,40 @@ | ||
<Grid cols="2"> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Stretch (default)<br/>…</DocsBox> | ||
</GridItem> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Stretch (default)</DocsBox> | ||
</GridItem> | ||
<DocsBox size="small">Normal (default)<br/>…</DocsBox> | ||
<DocsBox size="small">Normal (default)</DocsBox> | ||
</Grid> | ||
|
||
<Grid cols="2" alignmentX="left" alignmentY="top"> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
<Grid cols="2"> | ||
<Grid cols="1" alignmentX="stretch" alignmentY="stretch" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Stretch<br/>…</DocsBox> | ||
</Grid> | ||
<Grid cols="1" alignmentX="stretch" alignmentY="stretch" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Stretch</DocsBox> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid cols="2"> | ||
<Grid cols="1" alignmentX="left" alignmentY="top" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Left<br/>…</DocsBox> | ||
</GridItem> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
</Grid> | ||
<Grid cols="1" alignmentX="left" alignmentY="top" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Top</DocsBox> | ||
</GridItem> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid cols="2" alignmentX="center" alignmentY="center"> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
<Grid cols="2" > | ||
<Grid cols="1" alignmentX="center" alignmentY="center" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Center<br/>…</DocsBox> | ||
</GridItem> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
</Grid> | ||
<Grid cols="1" alignmentX="center" alignmentY="center" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Center</DocsBox> | ||
</GridItem> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid cols="2" alignmentX="right" alignmentY="bottom"> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
<Grid cols="2"> | ||
<Grid cols="1" alignmentX="right" alignmentY="bottom" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Right<br/>…</DocsBox> | ||
</GridItem> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
</Grid> | ||
<Grid cols="1" alignmentX="right" alignmentY="bottom" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Bottom</DocsBox> | ||
</GridItem> | ||
</Grid> | ||
</Grid> |
20 changes: 14 additions & 6 deletions
20
packages/web-twig/src/Resources/components/Grid/stories/GridResponsiveAlignment.twig
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 |
---|---|---|
@@ -1,11 +1,19 @@ | ||
<Grid cols="2" | ||
alignmentX="{{ { mobile: 'left', tablet: 'center', desktop: 'right' } }}" | ||
alignmentY="{{ { mobile: 'top', tablet: 'center', desktop: 'bottom' } }}" | ||
> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
<Grid | ||
cols="1" | ||
alignmentX="{{ { mobile: 'left', tablet: 'center', desktop: 'right' } }}" | ||
alignmentY="{{ { mobile: 'top', tablet: 'center', desktop: 'bottom' } }}" | ||
UNSAFE_className="bg-cover" | ||
> | ||
<DocsBox size="small">Horizontal Alignment<br/>…</DocsBox> | ||
</GridItem> | ||
<GridItem UNSAFE_className="bg-cover"> | ||
</Grid> | ||
<Grid | ||
cols="1" | ||
alignmentX="{{ { mobile: 'left', tablet: 'center', desktop: 'right' } }}" | ||
alignmentY="{{ { mobile: 'top', tablet: 'center', desktop: 'bottom' } }}" | ||
UNSAFE_className="bg-cover" | ||
> | ||
<DocsBox size="small">Vertical Alignment</DocsBox> | ||
</GridItem> | ||
</Grid> | ||
</Grid> |