Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 98133a5950 | |||
| 1ae484844b | |||
| e711a295c2 | |||
| a89f687c00 | |||
| 86a4411a30 |
@@ -2,6 +2,13 @@
|
||||
|
||||
## [x.x.x] - xxxx-xx-xx
|
||||
|
||||
## [2.2.2] - 2026-05-08
|
||||
- Add `[title]` attribute by default
|
||||
- Update showcase page to show semantic colours
|
||||
|
||||
## [2.2.1] - 2026-05-07
|
||||
- Fix `BROWN` colour classes
|
||||
|
||||
## [2.2.0] - 2026-05-05
|
||||
- Add semantic badge colours (`SUCCESS`, `WARNING`, `DANGER`)
|
||||
- Fix typos
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div {{ attributes }} class="{{ this.finalClasses }}"{% if this.label %} aria-label="{{ this.label }}"{% endif %}>
|
||||
<div {{ attributes.defaults({ "aria-label": this.label ?? "", "title": this.label ?? "", "class": this.finalClasses }) }}>
|
||||
<span class="inline-flex gap-1 items-center justify-center">
|
||||
{% if this.icon %}
|
||||
<twig:ux:icon name="{{ this.icon }}" class="size-[1em] shrink-0" aria-hidden="true" />
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
colors: {
|
||||
accent: '#7c3aed',
|
||||
primary: '#0f172a',
|
||||
danger: '#cc0000',
|
||||
warning: '#df5010',
|
||||
success: '#00d00a',
|
||||
},
|
||||
fontSize: {
|
||||
'2xs': ['0.625rem', '0.875rem'],
|
||||
@@ -28,7 +31,7 @@
|
||||
<h2 class="text-lg font-semibold mb-3">Solid</h2>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% for colour in colours %}
|
||||
<twig:Pcm:Badge colour="{{ colour }}">{{ colour }}</twig:Pcm:Badge>
|
||||
<twig:Pcm:Badge colour="{{ colour }}" :label="colour" />
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -50,7 +50,7 @@ enum BadgeColour
|
||||
$this::AMBER => new BadgePalette('text-amber-600', 'border-amber-600/30', 'bg-amber-600'),
|
||||
$this::BLACK => new BadgePalette('text-zinc-900', 'border-zinc-900/30', 'bg-zinc-900'),
|
||||
$this::BLUE => new BadgePalette('text-blue-700', 'border-blue-700/30', 'bg-blue-700'),
|
||||
$this::BROWN => new BadgePalette('text-stone-700', 'border-stone-700/30', 'bg-stone-700'),
|
||||
$this::BROWN => new BadgePalette('text-amber-800', 'border-amber-800/30', 'bg-amber-800'),
|
||||
$this::CYAN => new BadgePalette('text-cyan-600', 'border-cyan-600/30', 'bg-cyan-600'),
|
||||
$this::DANGER => new BadgePalette('text-danger', 'border-danger/30', 'bg-danger'),
|
||||
$this::DEFAULT => new BadgePalette('text-primary', 'border-primary/30', 'bg-primary'),
|
||||
|
||||
Reference in New Issue
Block a user