Skip to content

Commit

Permalink
Fix(web-twig): Bugfix Link component classes
Browse files Browse the repository at this point in the history
  • Loading branch information
janicekt authored and literat committed Jul 30, 2022
1 parent 7708bed commit c7389a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/web-twig/src/Resources/components/link.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% set _className = _spiritClassPrefix ~ 'link' %}
{% set _class = (props.class is defined) ? ' ' ~ props.class : '' -%}
{% set _color = (props.color is defined) ? _className ~ '--' ~ props.color : _className ~ '--primary' %}
{% set _disabled = props.isDisabled is defined and props.isDisabled == 'true' ? ' ' ~ _className ~ '--disabled' : '' %}
{% set _underlined = props.isUnderlined is defined and props.isUnderlined == 'true' ? ' ' ~ _className ~ '--underlined' : '' %}
{% set _color = (props.color is defined) ? _className ~ '-' ~ props.color : _className ~ '-primary' %}
{% set _disabled = props.isDisabled is defined and props.isDisabled == 'true' ? ' ' ~ _className ~ '-disabled' : '' %}
{% set _underlined = props.isUnderlined is defined and props.isUnderlined == 'true' ? ' ' ~ _className ~ '-underlined' : '' %}
{% set _href = (props.href is defined) ? props.href : '#' %}
{% set _title = (props.title is defined) ? ' title="' ~ props.ariaLabel ~ '"' : '' %}
{% set _target = (props.target is defined) ? ' target="' ~ props.target ~ '"' : '' %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<a href="/" class="link--primary">
<a href="/" class="link-primary">
Example link
</a>

<a href="/" class="link--secondary link--underlined">
<a href="/" class="link-secondary link-underlined">
Example link
</a>

<a href="/" class="link--primary link--disabled link--underlined">
<a href="/" class="link-primary link-disabled link-underlined">
Example link
</a>
</body></html>

0 comments on commit c7389a0

Please sign in to comment.