Skip to content

Commit

Permalink
Feat(web-twig): Introduce Header Navbar Close component (refs #DS-161)
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Jul 30, 2022
1 parent a1a2726 commit c504e61
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/web-twig/src/Resources/components/navbarClose.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% set _className = _spiritClassPrefix ~ 'Header' %}
{% set _class = (props.class is defined) ? ' ' ~ props.class : '' %}
{% set _label = (props.label is defined) ? props.label : 'Close' %}
{% set _ariaControls = (props.ariaControls is defined) ? ' aria-controls="' ~ props.ariaControls ~ '"' : '' %}

{% set _iconClassName = _spiritClassPrefix ~ 'Header__icon' %}

<button
type="button"
className="{{ _className }}__close{{ _class }}"
{{ _ariaControls }}
aria-expanded="false"
>
<span class="{{ _iconClassName }} {{ _iconClassName }}--close" aria-hidden="true"></span>
<span class="accessibility-hidden">{{ _label }}</span>
</button>

0 comments on commit c504e61

Please sign in to comment.