Skip to content

Commit

Permalink
Add colours to document list component
Browse files Browse the repository at this point in the history
  • Loading branch information
andysellick committed May 4, 2018
1 parent 8abc932 commit 2f4db8d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
items ||= []
margin_top_class = " gem-c-document-list--top-margin" if local_assigns[:margin_top]
margin_bottom_class = " gem-c-document-list--bottom-margin" if local_assigns[:margin_bottom]

brand ||= false
brand_helper = GovukPublishingComponents::Presenters::BrandHelper.new(brand)
%>
<% if items.any? %>
<ol class="gem-c-document-list<%= margin_bottom_class %><%= margin_top_class %>">
<ol class="gem-c-document-list<%= margin_bottom_class %><%= margin_top_class %> <%= brand_helper.get_brand %>">
<% items.each do |item| %>
<li class="gem-c-document-list__item">
<li class="gem-c-document-list__item <%= brand_helper.get_brand_element("border-color") %>">
<h3 class="gem-c-document-list__item-title">
<%=
link_to(
item[:link][:text],
item[:link][:path],
data: item[:link][:data_attributes]
data: item[:link][:data_attributes],
)
%>
</h3>
Expand Down

0 comments on commit 2f4db8d

Please sign in to comment.