diff --git a/packages/components/button/README.md b/packages/components/button/README.md index 13d0af4db..cade89045 100644 --- a/packages/components/button/README.md +++ b/packages/components/button/README.md @@ -62,7 +62,7 @@ Find out more about the button component and when to use it in the [NHS digital #### HTML markup ```html - ``` diff --git a/packages/components/button/_button.scss b/packages/components/button/_button.scss index 5bc8990ce..fac373d6a 100644 --- a/packages/components/button/_button.scss +++ b/packages/components/button/_button.scss @@ -194,7 +194,6 @@ $button-shadow-size: 4px; /** * Button disabled states */ -.nhsuk-button--disabled, .nhsuk-button:disabled { opacity: (0.5); pointer-events: none; diff --git a/packages/components/button/template.njk b/packages/components/button/template.njk index d893f02cc..ef949d08b 100644 --- a/packages/components/button/template.njk +++ b/packages/components/button/template.njk @@ -14,8 +14,7 @@ {# Define common attributes that we can use across all element types #} {% set commonAttributes %} class="nhsuk-button - {%- if params.classes %} {{ params.classes }}{% endif %} - {%- if params.disabled %} nhsuk-button--disabled{% endif %}" + {%- if params.classes %} {{ params.classes }}{% endif %}" data-module="nhsuk-button" {% if params.preventDoubleClick %} data-prevent-double-click="true"{% endif %} {{- nhsukAttributes(params.attributes) }} @@ -23,11 +22,11 @@ {# Define common attributes we can use for both button and input types #} {%- set buttonAttributes %}{% if params.name %} name="{{ params.name }}"{% endif %} type="{{ params.type if params.type else 'submit' }}" - {%- if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %} + {%- if params.disabled %} disabled aria-disabled="true"{% endif %} {%- endset -%} {% if element == 'a' %} - + {{ params.html | safe if params.html else params.text }}