Skip to content

Commit

Permalink
Fix(web-twig): Unifying Link implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
janicekt authored and literat committed Sep 8, 2022
1 parent 09e263e commit 28fe216
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/web-twig/src/Resources/components/Link/Link.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

{# Class names #}
{%- set _colorClassName = _spiritClassPrefix ~ 'link-' ~ _color -%}
{%- set _rootClassName = _spiritClassPrefix ~ 'link' -%}
{%- set _rootDisabledClassName = _isDisabled ? _spiritClassPrefix ~ 'link-disabled' : null -%}
{%- set _rootUnderlinedClassName = _isUnderlined ? _spiritClassPrefix ~ 'link-underlined' : null -%}

Expand All @@ -20,7 +19,7 @@
{%- set _titleAttr = _title ? 'title="' ~ _title ~ '"' : null -%}

{# Miscellaneous #}
{%- set _classNames = [ _rootClassName, _colorClassName, _rootDisabledClassName, _rootUnderlinedClassName, _class ] -%}
{%- set _classNames = [ _colorClassName, _rootDisabledClassName, _rootUnderlinedClassName, _class ] -%}

<a
{{ mainProps(props) }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<html><body>
<a href="/" class="link link-primary"> Example link
<a href="/" class="link-primary"> Example link
</a>
<a href="/" class="link link-secondary link-underlined"> Example link
<a href="/" class="link-secondary link-underlined"> Example link
</a>
<a href="/" class="link link-primary link-disabled link-underlined"> Example link
<a href="/" class="link-primary link-disabled link-underlined"> Example link
</a>
</body></html>

0 comments on commit 28fe216

Please sign in to comment.