Update the components.yml fiel for the my-card

Created on 6 September 2025, 30 days ago

Problem/Motivation

The documentation and example code for Single Directory Components (SDC) are inconsistent.
In the documentation here:
https://www.drupal.org/docs/develop/theming-drupal/using-single-director... β†’
the **header** is described as a **slot**, but in the `my-card` example it is defined as a **prop**.

Steps to reproduce

1. Open the `my-card` component example.
https://git.drupalcode.org/project/sdc_examples/-/blob/1.x/components/my...
2. Compare the `component.yml` and Twig template with the documentation.
3. Notice that the `header` property is defined as a prop, while the docs describe it as a slot.

Proposed resolution

Update the component annotation in the example so that `header` is declared as a slot, consistent with the documentation.

πŸ“Œ Task
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡¦Ukraine Foxy-vikvik

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024