diff --git a/packages/web-twig/CHANGELOG.md b/packages/web-twig/CHANGELOG.md index 61c1369d58..a1d6039187 100644 --- a/packages/web-twig/CHANGELOG.md +++ b/packages/web-twig/CHANGELOG.md @@ -8,6 +8,7 @@ - Chore: Require v2 of twigx-bundle and remove minimum stability flag - Fix: Add missing service registration for ComponentLexer - Fix: Set right order of filters +- Fix: Make `TextField` `id` mandatory as it is required for linking the label to the input ## 1.8.0 - 2022-07-18 - Update `Tag` - add sizes, split theme and color classes, allow elementType change diff --git a/packages/web-twig/src/Resources/components/Button/Button.twig b/packages/web-twig/src/Resources/components/Button/Button.twig index ad25d27bc1..d4c658365b 100644 --- a/packages/web-twig/src/Resources/components/Button/Button.twig +++ b/packages/web-twig/src/Resources/components/Button/Button.twig @@ -8,9 +8,9 @@ {%- set _type = props.type | default('button') -%} {# Class names #} -{%- set _colorClassName = _spiritClassPrefix ~ 'Button--' ~ _color -%} -{%- set _rootBlockClassName = _isBlock ? _spiritClassPrefix ~ 'Button--block' : null -%} {%- set _rootClassName = _spiritClassPrefix ~ 'Button' -%} +{%- set _rootBlockClassName = _isBlock ? _spiritClassPrefix ~ 'Button--block' : null -%} +{%- set _rootColorClassName = _spiritClassPrefix ~ 'Button--' ~ _color -%} {%- set _rootSquareClassName = _isSquare ? _spiritClassPrefix ~ 'Button--square' : null -%} {# Attributes #} @@ -18,7 +18,7 @@ {%- set _onClickAttr = _onClick ? 'onclick="' ~ _onClick ~'"' : null -%} {# Miscellaneous #} -{%- set _classNames = [ _rootClassName, _colorClassName, _rootBlockClassName, _rootSquareClassName, _class ] -%} +{%- set _classNames = [ _rootClassName, _rootColorClassName, _rootBlockClassName, _rootSquareClassName, _class ] -%}