Sha256: 767ca78a164319a58fa440b36ce9d84644bc9292fec407ac200c31b73304d349

Contents?: true

Size: 1.53 KB

Versions: 4

Compression:

Stored size: 1.53 KB

Contents

module GovukPublishingComponents
  module ComponentWrapperHelperOptions
    def self.description
      "
This component uses the component wrapper helper. It accepts the following options and applies them to the parent element of the component. See the [component wrapper helper documentation](https://github.com/alphagov/govuk_publishing_components/blob/main/docs/component-wrapper-helper.md) for more detail.

- `id` - accepts a string for the element ID attribute
- `data_attributes` - accepts a hash of data attributes
- `aria` - accepts a hash of aria attributes
- `classes` - accepts a space separated string of classes, these should not be used for styling and must be prefixed with `js-`
- `margin_bottom` - accepts a number 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)
- `role` - accepts a space separated string of roles
- `lang` - accepts a language attribute value
- `open` - accepts an open attribute value (true or false)
- `hidden` - accepts an empty string, 'hidden', or 'until-found'
- `tabindex` - accepts an integer. The integer can also be passed as a string
- `dir` - accepts 'rtl', 'ltr', or 'auto'
- `type` - accepts any valid type attribute e.g. 'button', 'submit', 'text'
- `rel` - accepts any valid rel attribute e.g. 'nofollow'
- `target` - accepts a valid target attribute e.g. '_blank'
- `title` - accepts any string
- `draggable` - accepts a draggable attribute value (\"true\" or \"false\")
      "
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
govuk_publishing_components-51.1.0 app/models/govuk_publishing_components/component_wrapper_helper_options.rb
govuk_publishing_components-51.0.0 app/models/govuk_publishing_components/component_wrapper_helper_options.rb
govuk_publishing_components-50.0.1 app/models/govuk_publishing_components/component_wrapper_helper_options.rb
govuk_publishing_components-50.0.0 app/models/govuk_publishing_components/component_wrapper_helper_options.rb