-
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.
- Loading branch information
Showing
3 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
packages/web-twig/src/Resources/components/Grid/GridSpan.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,23 @@ | ||
{# API #} | ||
{%- set props = props | default([]) -%} | ||
{%- set _class = props.class | default(null) -%} | ||
{%- set _over = props.over | default(null) -%} | ||
{%- set _desktop = props.desktop | default(null) -%} | ||
{%- set _elementType = props.elementType | default('div') -%} | ||
{%- set _tablet = props.tablet | default(null) -%} | ||
|
||
{# Class names #} | ||
{%- set _overClassName = _over ? _spiritClassPrefix ~ 'Grid__span--over-' ~ _over : null -%} | ||
{%- set _desktopClassName = _desktop ? _spiritClassPrefix ~ 'Grid__span--desktop--over-' ~ _desktop : null -%} | ||
{%- set _tabletClassName = _tablet ? _spiritClassPrefix ~ 'Grid__span--tablet--over-' ~ _tablet : null -%} | ||
{%- set _rootClassName = _spiritClassPrefix ~ 'Grid__span' -%} | ||
|
||
{# Miscellaneous #} | ||
{%- set _classNames = [ _rootClassName, _overClassName, _tabletClassName, _desktopClassName, _class ] -%} | ||
|
||
<{{ _elementType }} | ||
{{ mainProps(props) }} | ||
{{ classProp(_classNames) }} | ||
> | ||
{%- block content %}{% endblock -%} | ||
</{{ _elementType }}> |
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
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 @@ | ||
{% extends '@spirit/Grid/GridSpan.twig' %} |