Skip to content

Commit 0900ebb

Browse files
authored
feat(Card): Add space-between alignment for card slot (#1516)
WEB-2354 --------- Co-authored-by: Marcosld <Marcosld@users.noreply.github.com>
1 parent 7a05aab commit 0900ebb

16 files changed

Lines changed: 71 additions & 7 deletions

src/__private_stories__/card-slot-alignment-story.tsx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,18 @@ export const SlotAlignment: StoryComponent = () => {
6161
</ButtonLink>
6262
}
6363
/>
64+
<MediaCard
65+
title="Space Between"
66+
subtitle="Media card"
67+
slotAlignment="space-between"
68+
media={<Image aspectRatio="16:9" src={IMAGE_SRC} />}
69+
extra={[<Placeholder height={30} />, <Placeholder height={30} />]}
70+
buttonLink={
71+
<ButtonLink small href="https://google.com">
72+
Link
73+
</ButtonLink>
74+
}
75+
/>
6476
</Inline>
6577
<Inline space={16}>
6678
<NakedCard
@@ -98,6 +110,18 @@ export const SlotAlignment: StoryComponent = () => {
98110
</ButtonLink>
99111
}
100112
/>
113+
<NakedCard
114+
title="Space Between"
115+
subtitle="Media card"
116+
slotAlignment="space-between"
117+
media={<Image aspectRatio="16:9" src={IMAGE_SRC} />}
118+
extra={[<Placeholder height={30} />, <Placeholder height={30} />]}
119+
buttonLink={
120+
<ButtonLink small href="https://google.com">
121+
Link
122+
</ButtonLink>
123+
}
124+
/>
101125
</Inline>
102126
<Inline space={16}>
103127
<SmallNakedCard
@@ -120,6 +144,13 @@ export const SlotAlignment: StoryComponent = () => {
120144
media={<Image aspectRatio="16:9" src={IMAGE_SRC} />}
121145
extra={<Placeholder height={50} />}
122146
/>
147+
<SmallNakedCard
148+
title="Space Between"
149+
subtitle="Small Naked card"
150+
slotAlignment="space-between"
151+
media={<Image aspectRatio="16:9" src={IMAGE_SRC} />}
152+
extra={[<Placeholder height={30} />, <Placeholder height={30} />]}
153+
/>
123154
</Inline>
124155
<Inline space={16}>
125156
<DataCard
@@ -154,6 +185,17 @@ export const SlotAlignment: StoryComponent = () => {
154185
</ButtonLink>
155186
}
156187
/>
188+
<DataCard
189+
title="Space Between"
190+
subtitle="Data card"
191+
slotAlignment="space-between"
192+
extra={[<Placeholder height={30} />, <Placeholder height={30} />]}
193+
buttonLink={
194+
<ButtonLink small href="https://google.com">
195+
Link
196+
</ButtonLink>
197+
}
198+
/>
157199
</Inline>
158200
<Inline space={16}>
159201
<SnapCard title="Default" subtitle="Snap card" extra={<Placeholder height={100} />} />
@@ -169,6 +211,12 @@ export const SlotAlignment: StoryComponent = () => {
169211
slotAlignment="bottom"
170212
extra={<Placeholder height={50} />}
171213
/>
214+
<SnapCard
215+
title="Space Between"
216+
subtitle="Snap card"
217+
slotAlignment="space-between"
218+
extra={[<Placeholder height={30} />, <Placeholder height={30} />]}
219+
/>
172220
</Inline>
173221
</Stack>
174222
);
563 Bytes
Loading
618 Bytes
Loading
1.07 KB
Loading
708 Bytes
Loading
717 Bytes
Loading
Loading
Loading
-74.8 KB
Loading

src/__stories__/card-common.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export const mediaArgTypes = {
355355

356356
export const dataArgTypes = {
357357
slotAlignment: {
358-
options: ['', 'content', 'bottom'],
358+
options: ['', 'content', 'bottom', 'space-between'],
359359
control: {
360360
type: 'select',
361361
labels: {'': 'undefined'},

0 commit comments

Comments
 (0)