Skip to content

Commit

Permalink
Merge pull request #32 from IATI/cards
Browse files Browse the repository at this point in the history
Add extra functionality for cards
  • Loading branch information
tillywoodfield authored Dec 11, 2024
2 parents 9f6c309 + 9bc9cbf commit 09f4393
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/scss/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
background-color: white;
border-top: $border-width solid $color-teal-90;
padding: $padding-block;
display: flex;
flex-direction: column;

& :first-child {
margin-top: 0;
Expand Down Expand Up @@ -52,3 +54,17 @@
}
}
}

.iati-card-gallery {
--min-card-width: 300px;

display: flex;
flex-wrap: wrap;
width: 100%;
gap: $padding-block;

& > * {
flex: 1;
min-width: var(--min-card-width);
}
}
7 changes: 7 additions & 0 deletions src/scss/components/card/card.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ export const CardWithMenu: Story = {
</div>
`,
};

export const CardGallery: Story = {
render: () =>
html`<div class="iati-card-gallery">
${Array(5).fill(Card.render?.call({}))}
</div>`,
};

0 comments on commit 09f4393

Please sign in to comment.