Skip to content

Commit aada47e

Browse files
committed
Amend PhaseBanner to use new liquid template
1 parent a4868ba commit aada47e

File tree

20 files changed

+174
-261
lines changed

20 files changed

+174
-261
lines changed

docs/components/phase-banner.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Phase banner
1+
<!-- Generated from src/GovUk.Frontend.AspNetCore.Docs/Templates/components/phase-banner.liquid -->
2+
# GOV.UK footer
23

3-
[GDS Phase banner component](https://design-system.service.gov.uk/components/phase-banner/)
4+
[GOV.UK Design System GOV.UK phase banner component](https://design-system.service.gov.uk/components/phase-banner/)
45

5-
## Example
6+
7+
### Example
8+
<img alt="Phase banner example" src="../images/phase-banner-example.png" />
69

710
```razor
811
<govuk-phase-banner>
@@ -11,16 +14,15 @@
1114
</govuk-phase-banner>
1215
```
1316

14-
![Phase banner](../images/phase-banner.png)
1517

16-
## API
18+
### API
19+
20+
#### `<govuk-phase-banner>`
1721

18-
### `<govuk-phase-banner>`
1922

20-
The content is the HTML to use within the generated component.
23+
#### `<govuk-phase-banner-tag>`
2124

22-
### `<govuk-phase-banner-tag>`
25+
The content is the HTML to use for the tag in the phase banner.
2326

24-
*Required*\
25-
The content is the HTML to use within the phase banner tag.\
2627
Must be inside a `<govuk-phase-banner>` element.
28+
16 KB
Loading

docs/images/phase-banner.png

-7.93 KB
Binary file not shown.

src/GovUk.Frontend.AspNetCore.DocSamples/GovUk.Frontend.AspNetCore.DocSamples.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
<ItemGroup>
1313
<_ContentIncludedByDefault Remove="Pages\ServiceNavigation\Default.cshtml" />
14+
<_ContentIncludedByDefault Remove="Pages\PhaseBanner\PhaseBanner.cshtml" />
1415
</ItemGroup>
1516

1617
</Project>

src/GovUk.Frontend.AspNetCore.DocSamples/Pages/PhaseBanner/PhaseBanner.cshtml

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/GovUk.Frontend.AspNetCore.DocSamplesScreenshotter/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ await WriteScreenshots(new[]
8181
("SummaryList/SummaryListWithActions", "summary-list-with-actions.png"),
8282
("SummaryList/SummaryListWithCard", "summary-list-with-card.png"),
8383
("SummaryList/SummaryListWithoutActions", "summary-list-without-actions.png"),
84-
("PhaseBanner/PhaseBanner", "phase-banner.png"),
8584
("Tabs/Tabs", "tabs.png"),
8685
("Tag/DefaultTag", "tag-default.png"),
8786
("Tag/TagWithClass", "tag-with-class.png"),

src/GovUk.Frontend.AspNetCore.Docs/GovUk.Frontend.AspNetCore.xml

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@page
2+
3+
<example>
4+
<govuk-phase-banner>
5+
<govuk-phase-banner-tag>Alpha</govuk-phase-banner-tag>
6+
This is a new service - your <a href="#" class="govuk-link">feedback</a> will help us to improve it.
7+
</govuk-phase-banner>
8+
</example>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# GOV.UK footer
2+
3+
[GOV.UK Design System GOV.UK phase banner component](https://design-system.service.gov.uk/components/phase-banner/)
4+
5+
6+
### Example
7+
{{ tag_helper_example(
8+
"Examples/PhaseBanner/PhaseBannerExample",
9+
"phase-banner-example.png",
10+
"Phase banner example") }}
11+
12+
### API
13+
14+
{{ tag_helper_api("PhaseBannerTagHelper") }}
15+
16+
{{ tag_helper_api("PhaseBannerTagTagHelper") }}

src/GovUk.Frontend.AspNetCore/ComponentGeneration/DefaultComponentGenerator.ComponentElementTypes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ internal static class ComponentElementTypes
1414
public const string Header = "header";
1515
public const string InsetText = "div";
1616
public const string Pagination = "nav";
17+
public const string PhaseBanner = "div";
1718
public const string SkipLink = "a";
1819
public const string SummaryCard = "div";
1920
public const string SummaryList = "dl";

0 commit comments

Comments
 (0)