-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nhsuk-frontend-react): add missing summary-list variant
- Loading branch information
Showing
5 changed files
with
222 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nhsuk-frontend-react": patch | ||
--- | ||
|
||
fix(nhsuk-frontend-react): add missing summary-list variant |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,57 @@ export const Default: Story = { | |
</SummaryList> | ||
), | ||
}; | ||
|
||
export const NoBorder: Story = { | ||
args: { | ||
variant: 'no-border', | ||
}, | ||
render: (args) => ( | ||
<SummaryList {...args}> | ||
<SummaryList.Row> | ||
<SummaryList.Key>Name</SummaryList.Key> | ||
<SummaryList.Value>John Smith</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<SummaryList.ActionLink visuallyHiddenText="name" href="#"> | ||
Change | ||
</SummaryList.ActionLink> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
<SummaryList.Row> | ||
<SummaryList.Key>Date of birth </SummaryList.Key> | ||
<SummaryList.Value>1 January 1990</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<SummaryList.ActionLink visuallyHiddenText="date of birth" href="#"> | ||
Change | ||
</SummaryList.ActionLink> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
<SummaryList.Row> | ||
<SummaryList.Key>Address</SummaryList.Key> | ||
<SummaryList.Value> | ||
1 Smith Street, Smithville, <br /> | ||
Smithfield, <br /> | ||
Smithshire, <br /> | ||
SM1 1SM | ||
</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<SummaryList.ActionLink visuallyHiddenText="address" href="#"> | ||
Change | ||
</SummaryList.ActionLink> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
<SummaryList.Row> | ||
<SummaryList.Key>Contact details</SummaryList.Key> | ||
<SummaryList.Value> | ||
07000 000000 <br /> | ||
[email protected] | ||
</SummaryList.Value> | ||
<SummaryList.Actions> | ||
<SummaryList.ActionLink visuallyHiddenText="contact details" href="#"> | ||
Change | ||
</SummaryList.ActionLink> | ||
</SummaryList.Actions> | ||
</SummaryList.Row> | ||
</SummaryList> | ||
), | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,3 +132,136 @@ exports[`should render the SummaryList component 1`] = ` | |
</dl> | ||
</div> | ||
`; | ||
|
||
exports[`should render the SummaryList component with no border 1`] = ` | ||
<div> | ||
<dl | ||
class="nhsuk-summary-list nhsuk-summary-list--no-border" | ||
> | ||
<div | ||
class="nhsuk-summary-list__row" | ||
> | ||
<dt | ||
class="nhsuk-summary-list__key" | ||
> | ||
Name | ||
</dt> | ||
<dd | ||
class="nhsuk-summary-list__value" | ||
> | ||
John Smith | ||
</dd> | ||
<dd | ||
class="nhsuk-summary-list__actions" | ||
> | ||
<a | ||
href="#" | ||
> | ||
Change | ||
<span | ||
class="nhsuk-u-visually-hidden" | ||
> | ||
name | ||
</span> | ||
</a> | ||
</dd> | ||
</div> | ||
<div | ||
class="nhsuk-summary-list__row" | ||
> | ||
<dt | ||
class="nhsuk-summary-list__key" | ||
> | ||
Date of birth | ||
</dt> | ||
<dd | ||
class="nhsuk-summary-list__value" | ||
> | ||
1 January 1990 | ||
</dd> | ||
<dd | ||
class="nhsuk-summary-list__actions" | ||
> | ||
<a | ||
href="#" | ||
> | ||
Change | ||
<span | ||
class="nhsuk-u-visually-hidden" | ||
> | ||
date of birth | ||
</span> | ||
</a> | ||
</dd> | ||
</div> | ||
<div | ||
class="nhsuk-summary-list__row" | ||
> | ||
<dt | ||
class="nhsuk-summary-list__key" | ||
> | ||
Address | ||
</dt> | ||
<dd | ||
class="nhsuk-summary-list__value" | ||
> | ||
1 Smith Street, Smithville, | ||
<br /> | ||
Smithfield, | ||
<br /> | ||
Smithshire, | ||
<br /> | ||
SM1 1SM | ||
</dd> | ||
<dd | ||
class="nhsuk-summary-list__actions" | ||
> | ||
<a | ||
href="#" | ||
> | ||
Change | ||
<span | ||
class="nhsuk-u-visually-hidden" | ||
> | ||
address | ||
</span> | ||
</a> | ||
</dd> | ||
</div> | ||
<div | ||
class="nhsuk-summary-list__row" | ||
> | ||
<dt | ||
class="nhsuk-summary-list__key" | ||
> | ||
Contact details | ||
</dt> | ||
<dd | ||
class="nhsuk-summary-list__value" | ||
> | ||
07000 000000 | ||
<br /> | ||
[email protected] | ||
</dd> | ||
<dd | ||
class="nhsuk-summary-list__actions" | ||
> | ||
<a | ||
href="#" | ||
> | ||
Change | ||
<span | ||
class="nhsuk-u-visually-hidden" | ||
> | ||
contact details | ||
</span> | ||
</a> | ||
</dd> | ||
</div> | ||
</dl> | ||
</div> | ||
`; |