diff --git a/app/views/govuk_publishing_components/components/docs/govspeak.yml b/app/views/govuk_publishing_components/components/docs/govspeak.yml index 07647e6065..57f560b6e1 100644 --- a/app/views/govuk_publishing_components/components/docs/govspeak.yml +++ b/app/views/govuk_publishing_components/components/docs/govspeak.yml @@ -32,9 +32,16 @@ examples: inverse: true block: |
This is some body text with a link.
+This is some body text with a link.
context: dark_background: true + with_margin_bottom: + description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to no margin bottom, as spacing below is normally provided by elements within the component. + data: + margin_bottom: 9 + block: | +This is some body text with a link.
heading_levels: data: block: | diff --git a/spec/components/govspeak_spec.rb b/spec/components/govspeak_spec.rb index f9e5004d12..490014d028 100644 --- a/spec/components/govspeak_spec.rb +++ b/spec/components/govspeak_spec.rb @@ -21,6 +21,21 @@ def component_name assert_select ".gem-c-govspeak.gem-c-govspeak--inverse h2", text: "inverse" end + it "applies default margin to the component" do + render_component( + content: "