Skip to content

Commit e6abe0d

Browse files
Merge pull request #49 from agilecollective/feature/section
Section component
2 parents 1212ed2 + 5fd9c4e commit e6abe0d

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed

src/scss/components/_index.scss

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
@forward "icon/icon";
1010
@forward "jump-menu/jump-menu";
1111
@forward "search-bar/search-bar";
12+
@forward "section/section";
1213
@forward "table/table";
1314
@forward "menu-toggle/menu-toggle";
1415
@forward "message/message";
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@use "../../tokens/color" as *;
2+
@use "../../tokens/spacing" as *;
3+
4+
.iati-section {
5+
&__title {
6+
text-transform: uppercase;
7+
background-color: $color-teal-90;
8+
color: #fff;
9+
font-size: 1.0625rem;
10+
padding: 0.5rem 1rem;
11+
font-weight: 700;
12+
margin: 0;
13+
}
14+
&__content {
15+
padding-block: 1rem;
16+
> * {
17+
margin: 0 0 1rem;
18+
}
19+
> *:last-child {
20+
margin: 0;
21+
}
22+
}
23+
&--fill {
24+
.iati-section__content {
25+
padding-inline: 1rem;
26+
background-color: $color-teal-10;
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import type { Meta, StoryObj } from "@storybook/web-components";
2+
3+
import { html } from "lit";
4+
5+
const meta: Meta = {
6+
title: "Components/Section",
7+
};
8+
9+
export default meta;
10+
type Story = StoryObj;
11+
12+
export const Default: Story = {
13+
render: () => html`
14+
<div class="iati-section">
15+
<h2 class="iati-section__title">About</h2>
16+
<div class="iati-section__content">
17+
<p>
18+
The time-lag statistics attempt to assess how up to date the data
19+
is at the point that it is refreshed. For instance a publisher may
20+
refresh their data monthly, but the refreshed data is in fact three
21+
months old. Alternatively a publisher may only refresh their data once
22+
a year, but when they do it contains current data that is less than
23+
one month out of date.
24+
</p>
25+
<p>
26+
Transactions are the most numerous and most regularly refreshed
27+
elements in reported IATI activities and they are therefore used to
28+
make this assessment.
29+
</p>
30+
<p>
31+
The table of statistics shows the number of transaction dates reported
32+
in each of the last twelve calendar months. The current month is shown
33+
for informational purposes, but excluded from the assessment.
34+
</p>
35+
</div>
36+
</div>
37+
`,
38+
};
39+
40+
export const Fill: Story = {
41+
render: () => html`
42+
<div class="iati-section iati-section--fill">
43+
<h2 class="iati-section__title">About</h2>
44+
<div class="iati-section__content">
45+
<p>
46+
The time-lag statistics attempt to assess how up to date the data
47+
is at the point that it is refreshed. For instance a publisher may
48+
refresh their data monthly, but the refreshed data is in fact three
49+
months old. Alternatively a publisher may only refresh their data once
50+
a year, but when they do it contains current data that is less than
51+
one month out of date.
52+
</p>
53+
<p>
54+
Transactions are the most numerous and most regularly refreshed
55+
elements in reported IATI activities and they are therefore used to
56+
make this assessment.
57+
</p>
58+
<p>
59+
The table of statistics shows the number of transaction dates reported
60+
in each of the last twelve calendar months. The current month is shown
61+
for informational purposes, but excluded from the assessment.
62+
</p>
63+
</div>
64+
</div>
65+
`,
66+
};

0 commit comments

Comments
 (0)