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

Accordion component #45

Merged
merged 2 commits into from
Aug 20, 2020
Merged

Accordion component #45

merged 2 commits into from
Aug 20, 2020

Conversation

peteryates
Copy link
Member

Add the accordion component

render GovukComponent::Accordion.new(id: 'abc123') do |component|
  component.slot(:section, title: 'Home electronics', summary: 'Entertainment, communication and recreation') do
    tag.p("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", class: 'govuk-body')
  end

  component.slot(:section, title: 'Appliances', summary: 'Laundry, cookers and vacuum cleaners') do
    tag.p("Ut et elementum tortor. Donec a tellus sed sem euismod congue", class: 'govuk-body')
  end

  component.slot(:section, title: 'Toys') do
    safe_join([
      tag.p("In et nunc vitae tortor sollicitudin ultrices. Vivamus a purus justo.", class: 'govuk-body'),
      tag.p("Duis a turpis non nunc pulvinar venenatis quis congue mauris. Nullam vel consequat diam, vel venenatis nulla.", class: 'govuk-body')
    ])
  end
end

Screenshot from 2020-08-19 17-14-49

@peteryates peteryates merged commit 77aa2d9 into master Aug 20, 2020
@peteryates peteryates deleted the accordion-component branch August 20, 2020 16:55
@peteryates peteryates mentioned this pull request Sep 8, 2020
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant