{% stories user with { title: 'Components/user' } %}

{% story default with {
  name: 'user',
  args: {
   user: 'admin'
  }
} %}

{% set attributes = create_attribute({
    src: 'TomFarley.png',
    alt: 'latest image',
    width: '200',
    height: '200',
}) %}


{% set image %}
   {% embed 'tailpine:image' with { attributes: attributes, style_name: 'medium'
  } %}{% endembed %}
{% endset %}

{% set url = '/user/1' %}

{% set image_formatter %}
  {% embed "tailpine:image-formatter" with { image: image, url: url } %}{% endembed %}
  {% endset %}

{% set attribute = create_attribute() %}

{% set content %}
    {% embed 'tailpine:field' with {
      field_name: 'field_media_image',
      field_type: 'image',
      label: 'Image',
      label_display: 'hidden',
      label_hidden: true,
      items: [
        { content: image_formatter }
      ]
    } 
  %}{% endembed %}
{% endset %}

  {% embed 'tailpine:user' with { attributes: attribute, content: content } %}{% endembed %}
{% endstory %}
{% endstories %}
