Skip to content

Commit

Permalink
feat: add support for 'attributes', remove 'attributes' from ratio in…
Browse files Browse the repository at this point in the history
…clude
  • Loading branch information
Daniel Morse committed Feb 22, 2019
1 parent 25c3c90 commit 6878f1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/components/bolt-image/image.schema.yml
Expand Up @@ -6,6 +6,9 @@ anyOf:
- required:
- srcset
properties:
attributes:
type: object
description: A Drupal-style attributes object with extra attributes to append to this component.
src:
type: string
description: Source url for image.
Expand Down
2 changes: 1 addition & 1 deletion packages/components/bolt-image/src/image.twig
Expand Up @@ -116,11 +116,11 @@
{% if cover %}cover{% endif %}
{% if not lazyload %}no-lazy{% endif %}
{% if can_use_placeholder and is_jpg %} style="background-color: {{ ph_color }};" {% endif %}
{{ attributes }}
>
{% block image_content %}
{% if can_use_ratio %}
{% include "@bolt-components-ratio/ratio.twig" with {
attributes: attributes,
aspectRatioHeight: height * 1,
aspectRatioWidth: width * 1,
children: [
Expand Down

0 comments on commit 6878f1d

Please sign in to comment.