src/components/patterns/benefits-slider/_benefits-slider--mobile
// src/components/patterns/benefits-slider/_benefits-slider--mobile/schema.yaml
$schema: http://json-schema.org/draft-07/schema
$id: /patterns/benefits-slider/_benefits-slider--mobile
additionalProperties: false
required:
- overview
- benefits
properties:
overview:
type: string
description: /patterns/benefits-slider/_benefits-slider--mobile/_overview-slide
benefits:
type: array
items:
type: string
description: /patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
// src/components/patterns/benefits-slider/_benefits-slider--mobile/mocks.yaml
overview:
$tpl: patterns/benefits-slider/_benefits-slider--mobile/_overview-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_overview-slide
benefits:
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-1
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-2
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-3
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-4
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-5
// src/components/patterns/benefits-slider/_benefits-slider--mobile/_benefits-slider--mobile.twig
<div class="BenefitsSlider js-BenefitsSlider swiper BenefitsSlider--mobile">
<div class="swiper-wrapper">
{{ overview }}
{% for benefit in benefits %}
{{ benefit }}
{% endfor %}
</div>
{% include "@patterns/benefits-slider/_benefits-slider-controls/_benefits-slider-controls.twig" %}
</div>
default mock data
overview:
$tpl: patterns/benefits-slider/_benefits-slider--mobile/_overview-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_overview-slide
benefits:
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-1
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-2
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-3
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-4
- $tpl: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide
$ref: patterns/benefits-slider/_benefits-slider--mobile/_benefit-slide#benefit-5