-
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.
Feat(web-twig): Add alignmentX and alignmentY prop to Grid component …
…#DS-1414
- Loading branch information
1 parent
db53e7e
commit cb37679
Showing
8 changed files
with
207 additions
and
18 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
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
35 changes: 35 additions & 0 deletions
35
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<Grid cols="2"> | ||
<Grid cols="1" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Stretch (default)<br/>…</DocsBox> | ||
</Grid> | ||
<Grid cols="1" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Stretch (default)</DocsBox> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid cols="2"> | ||
<Grid cols="1" alignmentX="left" alignmentY="top" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Left<br/>…</DocsBox> | ||
</Grid> | ||
<Grid cols="1" alignmentX="left" alignmentY="top" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Top</DocsBox> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid cols="2" > | ||
<Grid cols="1" alignmentX="center" alignmentY="center" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Center<br/>…</DocsBox> | ||
</Grid> | ||
<Grid cols="1" alignmentX="center" alignmentY="center" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Center</DocsBox> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid cols="2"> | ||
<Grid cols="1" alignmentX="right" alignmentY="bottom" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Right<br/>…</DocsBox> | ||
</Grid> | ||
<Grid cols="1" alignmentX="right" alignmentY="bottom" UNSAFE_className="bg-cover"> | ||
<DocsBox size="small">Bottom</DocsBox> | ||
</Grid> | ||
</Grid> |
19 changes: 19 additions & 0 deletions
19
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Grid cols="2" | ||
> | ||
<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> | ||
</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> | ||
</Grid> | ||
</Grid> |