diff --git a/packages/web-twig/src/Resources/components/Icon/Icon.twig b/packages/web-twig/src/Resources/components/Icon/Icon.twig index 19e50b2fd3..8c24a2e796 100644 --- a/packages/web-twig/src/Resources/components/Icon/Icon.twig +++ b/packages/web-twig/src/Resources/components/Icon/Icon.twig @@ -4,10 +4,4 @@ {%- set _size = props.size | default('24') -%} {%- set _title = props.title | default(null) -%} -{# Class names #} -{%- set _rootClassName = _spiritClassPrefix ~ 'Icon' -%} - -{# Miscellaneous #} -{%- set _classNames = [ _rootClassName, _class ] -%} - -{{ inlineSvg('@icons-assets/' ~ _name ~ '.svg', { class: _classNames|join(' '), size: _size, title: _title, mainProps: props }) }} +{{ inlineSvg('@icons-assets/' ~ _name ~ '.svg', { class: _class, size: _size, title: _title, mainProps: props }) }} diff --git a/packages/web-twig/src/Resources/components/Icon/README.md b/packages/web-twig/src/Resources/components/Icon/README.md index 319a36093e..16baacd30a 100644 --- a/packages/web-twig/src/Resources/components/Icon/README.md +++ b/packages/web-twig/src/Resources/components/Icon/README.md @@ -1,7 +1,5 @@ # Icon -This is Twig implementation of the [Icon] component. - Icon component uses inlineSVG extension, so don't forget to add icons path in the configuration as seen in [inlineSVG docs]. @@ -34,8 +32,7 @@ Without lexer: | `size` | `number` | `24` | no | Size of the icon | | `title` | `string` | `null` | no | Optional title to display on hover | -Get list of `name` options in the [Icon package] or your source of icons. +Get the list of `name` options in the [Icon package] or your source of icons. -[icon]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web/src/components/Icon [inlinesvg docs]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/web-twig/docs/inlineSVG.md [icon package]: https://github.com/lmc-eu/spirit-design-system/tree/main/packages/icons diff --git a/packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__test with data set alertDefault.twig__1.html b/packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__test with data set alertDefault.twig__1.html index 31627b3495..6523979a09 100644 --- a/packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__test with data set alertDefault.twig__1.html +++ b/packages/web-twig/tests/__snapshots__/ComponentsSnapshotTest__test with data set alertDefault.twig__1.html @@ -1,6 +1,6 @@