diff --git a/src/components/details/_macro-options.md b/src/components/details/_macro-options.md index 738f896ba6..565395e439 100644 --- a/src/components/details/_macro-options.md +++ b/src/components/details/_macro-options.md @@ -4,3 +4,5 @@ | title | string | true | The title for the details | | content | string | true | HTML content for the details | | buttonClose | string | false | Text for the button when the details are open. If not specified button will not render | +| classes | string | false | Classes to add to the details element | +| attributes | object | false | HTML attributes (for example data attributes) to add to the details element | diff --git a/src/components/details/_template.njk b/src/components/details/_template.njk index 6e6b14552e..a82894bb29 100644 --- a/src/components/details/_template.njk +++ b/src/components/details/_template.njk @@ -1,7 +1,7 @@ {% from "components/button/_macro.njk" import onsButton %} -
+

{{ params.title }}

{% if params.buttonClose and params.buttonOpen and params.isAccordion %}