new things.

This commit is contained in:
Dan Chadwick
2024-05-18 21:34:59 -04:00
parent 90559e017d
commit 5456271fb1
28 changed files with 713 additions and 349 deletions

View File

@@ -0,0 +1,12 @@
name: Accordion
props:
type: object
properties: { }
slots:
# Content.
accordion_headline:
title: Accordion Title
description: "The accordion title."
accordion_content:
title: Accordion Content
description: "The accordion content."

View File

@@ -0,0 +1,14 @@
{% set classes = [
'accordion',
] %}
<div class="accordion">
<div class="accordion-item">
<h2 class="accordion-header">
{% block accordion_title %}{% endblock %}
</h2>
</div>
<div class="accordion-body">
{% block accordion_content %}{% endblock %}
</div>
</div>

View File

@@ -0,0 +1,17 @@
name: Button
props:
type: object
required:
- type
properties:
type:
type: string
title: Type
description: "The type of button to render"
# The enum directive restricts the possible values in the element to our list.
enum: ['primary', 'secondary', 'danger']
slots:
# Content to display in the chip.
button_text:
title: Button Text
description: The text for the button

View File

@@ -0,0 +1,7 @@
((Drupal) => {
Drupal.behaviors.button = {
attach(context) {
console.log("hello");
},
};
})(Drupal);

View File

@@ -0,0 +1,10 @@
{%
set classes = [
'btn',
'btn-' ~ type|clean_class,
]
%}
<button class="{{ classes|join(" ") }}">
{% block button_text %}{% endblock %}
</button>