Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an alpha label component #527

Merged
merged 1 commit into from
Jan 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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