Initial Drupal 11 with DDEV setup
This commit is contained in:
38
vendor/chi-teck/drupal-code-generator/templates/_sdc/component.twig
vendored
Normal file
38
vendor/chi-teck/drupal-code-generator/templates/_sdc/component.twig
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
'$schema': 'https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json'
|
||||
name: {{ component_name }}
|
||||
status: stable
|
||||
{% if component_description %}
|
||||
description: {{ component_description }}
|
||||
{% endif %}
|
||||
{% if component_libraries|length > 0 %}
|
||||
libraryOverrides:
|
||||
dependencies:
|
||||
{% for library in component_libraries %}
|
||||
- {{ library }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if component_props|length > 0 %}
|
||||
props:
|
||||
type: object
|
||||
properties:
|
||||
{% for prop in component_props %}
|
||||
{{ prop.name }}:
|
||||
type: {{ prop.type }}
|
||||
title: {{ prop.title }}
|
||||
{% if prop.description %}
|
||||
description: {{ prop.description }}
|
||||
{% endif %}
|
||||
# @todo Add examples here.
|
||||
examples: []
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if component_slots|length > 0 %}
|
||||
slots:
|
||||
{% for slot in component_slots %}
|
||||
{{ slot.name }}:
|
||||
title: {{ slot.title }}
|
||||
{% if slot.description %}
|
||||
description: {{ slot.description }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user