-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(web-twig): Introduce Header Navbar Close component (refs #DS-161)
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/web-twig/src/Resources/components/navbarClose.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |