Problem/Motivation

If the markup of a variant is too differnt from another variant it often makes sense to put the markup in own template file.
Right now it is only possible to assign one template to pattern using the "use" attribute.

card:
  label: "Card"
  use: "@molecules/card/card.twig"
  variants:
    default:
      label: Default
    horizontal:
      label: Horizontal
      use: "@molecules/card/card--horizontal.twig"

Proposed resolution

Add the possibilitly to assign a template to a variant.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Christian.wiedemann created an issue. See original summary.

christian.wiedemann’s picture

Status: Active » Needs review
pdureau’s picture

Status: Needs review » Needs work

Hi Christian,

If I remember well, we talked about this issue during a monthly meeting and some tests were missing.

Grimreaper made their first commit to this issue’s fork.

grimreaper’s picture

Assigned: Unassigned » grimreaper

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

christian.wiedemann’s picture