Skip to content

Commit

Permalink
Merge pull request #527 from alphagov/alpha-label
Browse files Browse the repository at this point in the history
Add an alpha label component
  • Loading branch information
alicebartlett committed Jan 12, 2015
2 parents cdf83d7 + fe9e8e5 commit 7bb41dd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/govuk-component/_alpha-label.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.govuk-alpha-label {
@include phase-banner($state: alpha);
}
1 change: 1 addition & 0 deletions app/assets/stylesheets/govuk-component/_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import "design-patterns/alpha-beta";

// Components styles
@import "alpha-label";
@import "beta-label";
@import "document-footer";
@import "govspeak";
Expand Down
12 changes: 12 additions & 0 deletions app/views/govuk_component/alpha_label.raw.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="govuk-alpha-label">
<p>
<strong class="phase-tag">Alpha</strong>
<span>
<% if local_assigns.include?(:message) %>
<%= raw message %>
<% else %>
This part of GOV.UK is being built &ndash; <a href="/service-manual/phases/ideal-alphas">find out what this means</a>
<% end %>
</span>
</p>
</div>
9 changes: 8 additions & 1 deletion app/views/govuk_component/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
- id: "alpha_label"
name: "Alpha Banner"
description: "A banner that indicates content is in an alpha phase with an optional explanation"
fixtures:
default: {}
with_message:
message: "This is an optional different message to explain what Alpha means in this context which can take <a href='https://www.gov.uk'>HTML</a>"
- id: "beta_label"
name: "Beta Banner"
description: "A banner than indicates content is in a beta phase with an optional explanation"
description: "A banner that indicates content is in a beta phase with an optional explanation"
fixtures:
default: {}
with_message:
Expand Down

0 comments on commit 7bb41dd

Please sign in to comment.