|
|
|
@ -80,13 +80,13 @@ export const AlignItemsExamples: StoryFn<typeof Stack> = () => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div style={{ width: '600px' }}> |
|
|
|
<div style={{ width: '600px' }}> |
|
|
|
<p>Align items flex-start</p> |
|
|
|
<p>Align items flex-start</p> |
|
|
|
<Stack direction="row" wrap="wrap" alignItems="flex-start" justifyContent="start" gap={2}> |
|
|
|
<Stack direction="row" wrap alignItems="flex-start" justifyContent="start" gap={2}> |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</Stack> |
|
|
|
</Stack> |
|
|
|
<p>Align items flex-end</p> |
|
|
|
<p>Align items flex-end</p> |
|
|
|
<Stack direction="row" wrap="wrap" alignItems="flex-end" justifyContent="end" gap={2}> |
|
|
|
<Stack direction="row" wrap alignItems="flex-end" justifyContent="end" gap={2}> |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
))} |
|
|
|
))} |
|
|
|
@ -98,13 +98,13 @@ export const AlignItemsExamples: StoryFn<typeof Stack> = () => { |
|
|
|
))} |
|
|
|
))} |
|
|
|
</Stack> |
|
|
|
</Stack> |
|
|
|
<p>Align items center</p> |
|
|
|
<p>Align items center</p> |
|
|
|
<Stack direction="row" wrap="wrap" alignItems="center" justifyContent="center" gap={2}> |
|
|
|
<Stack direction="row" wrap alignItems="center" justifyContent="center" gap={2}> |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</Stack> |
|
|
|
</Stack> |
|
|
|
<p>Align items stretch</p> |
|
|
|
<p>Align items stretch</p> |
|
|
|
<Stack direction="row" wrap="wrap" alignItems="stretch" justifyContent="center" gap={2}> |
|
|
|
<Stack direction="row" wrap alignItems="stretch" justifyContent="center" gap={2}> |
|
|
|
<Item color={theme.colors.error.main} height="10em" /> |
|
|
|
<Item color={theme.colors.error.main} height="10em" /> |
|
|
|
<Item color={theme.colors.error.main} /> |
|
|
|
<Item color={theme.colors.error.main} /> |
|
|
|
<Item color={theme.colors.error.main} height="3em" /> |
|
|
|
<Item color={theme.colors.error.main} height="3em" /> |
|
|
|
@ -131,7 +131,7 @@ export const JustifyContentExamples: StoryFn<typeof Stack> = () => { |
|
|
|
{justifyContentOptions.map((justifyContent) => ( |
|
|
|
{justifyContentOptions.map((justifyContent) => ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<p>Justify Content {justifyContent}</p> |
|
|
|
<p>Justify Content {justifyContent}</p> |
|
|
|
<Stack direction="row" wrap="wrap" alignItems="center" justifyContent={justifyContent} gap={2}> |
|
|
|
<Stack direction="row" wrap alignItems="center" justifyContent={justifyContent} gap={2}> |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
<Item key={i} color={theme.colors.warning.main} text={i + 1} /> |
|
|
|
<Item key={i} color={theme.colors.warning.main} text={i + 1} /> |
|
|
|
))} |
|
|
|
))} |
|
|
|
@ -150,7 +150,7 @@ export const GapExamples: StoryFn<typeof Stack> = () => { |
|
|
|
{gapOptions.map((gap) => ( |
|
|
|
{gapOptions.map((gap) => ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<p>Gap with spacingToken set to {gap}</p> |
|
|
|
<p>Gap with spacingToken set to {gap}</p> |
|
|
|
<Stack direction="row" wrap="wrap" alignItems="flex-start" justifyContent="flex-start" gap={gap}> |
|
|
|
<Stack direction="row" wrap alignItems="flex-start" justifyContent="flex-start" gap={gap}> |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
<Item key={i} color={theme.colors.error.main} text={i + 1} /> |
|
|
|
))} |
|
|
|
))} |
|
|
|
@ -188,7 +188,7 @@ export const DirectionExamples: StoryFn<typeof Stack> = () => { |
|
|
|
{directionOptions.map((direction) => ( |
|
|
|
{directionOptions.map((direction) => ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<p>Direction {direction}</p> |
|
|
|
<p>Direction {direction}</p> |
|
|
|
<Stack direction={direction} wrap="wrap" alignItems="center" justifyContent="center" gap={2}> |
|
|
|
<Stack direction={direction} wrap alignItems="center" justifyContent="center" gap={2}> |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
{Array.from({ length: 5 }).map((_, i) => ( |
|
|
|
<Item key={i} color={theme.colors.warning.main} text={i + 1} /> |
|
|
|
<Item key={i} color={theme.colors.warning.main} text={i + 1} /> |
|
|
|
))} |
|
|
|
))} |
|
|
|
|