Randomg things.

This commit is contained in:
calcu1on
2025-10-15 22:49:16 -04:00
parent 73b1faf9cc
commit 09043d7884
12 changed files with 8214 additions and 114 deletions

View File

@@ -0,0 +1,13 @@
name: Alert
props:
type: object
properties:
alertType:
type: string
title: Alert Type
description: 'The type of alert.'
slots:
alertText:
title: Alert Text
required: true
description: The test for the alert.

View File

@@ -0,0 +1,21 @@
.alert-wrapper .field_alert_text {
padding: 20px 0;
text-align: center;
}
.alert.normal {
background-color: deepskyblue;
color: darkblue;
}
.alert.warning {
background-color: goldenrod;
color: black;
font-weight: bold;
}
.alert.danger {
background-color: lightpink;
color: darkred;
font-weight: bolder;
}

View File

@@ -0,0 +1,3 @@
<div class="alert {{ alertType }}">
{% block alertText %}{% endblock %}
</div>

View File

@@ -0,0 +1,26 @@
{#
* Component variables
*
* props:
* alerType
*
* slots
* alertText
*
#}
<div {{ attributes.addClass('alert-wrapper') }}>
{{ title_prefix }}
{{ title_suffix }}
{% set alertType = content.field_alert_type.0['#markup']|clean_class %}
{% embed 'dchadwick:alert' with {
alertType: alertType,
}%}
{% block alertText %}
<p>{{ content.field_alert_text }}</p>
{% endblock%}
{% endembed %}
</div>