mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-28 07:43:18 +00:00
🎨 Add new Flux icons: implement multiple reusable icon components (e.g., hand-raised, hand-thumb-up, heart, hashtag, home) with variant support for improved UI consistency.
This commit is contained in:
50
resources/views/flux/editor/toolbar.blade.php
Normal file
50
resources/views/flux/editor/toolbar.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@aware(['variant' => null])
|
||||
|
||||
@props([
|
||||
'items' => null,
|
||||
'variant' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
$classes = Flux::classes()
|
||||
->add('block overflow-x-auto w-full')
|
||||
->add(match($variant) {
|
||||
'borderless' => 'rounded-lg bg-zinc-100 dark:bg-white/10 *:p-1.5 *:h-auto',
|
||||
default => [
|
||||
'bg-zinc-50 dark:bg-white/[6%] dark:border-white/5',
|
||||
'rounded-t-[calc(0.5rem-1px)]',
|
||||
'border-b border-zinc-200 dark:border-white/10',
|
||||
]
|
||||
})
|
||||
;
|
||||
@endphp
|
||||
|
||||
<ui-toolbar {{ $attributes->class($classes) }} wire:ignore aria-label="{{ __('Formatting') }}">
|
||||
<div class="h-10 p-2 flex gap-2 items-center">
|
||||
<?php if ($slot->isNotEmpty()): ?>
|
||||
{{ $slot }}
|
||||
<?php else: ?>
|
||||
<?php if ($items !== null): ?>
|
||||
<?php foreach (str($items)->explode(' ') as $item): ?>
|
||||
<?php if ($item === '|') $item = 'separator'; ?>
|
||||
<?php if ($item === '~') $item = 'spacer'; ?>
|
||||
<flux:delegate-component :component="'editor.' . $item"></flux:delegate-component>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<flux:editor.heading />
|
||||
<flux:editor.separator />
|
||||
<flux:editor.bold />
|
||||
<flux:editor.italic />
|
||||
<flux:editor.strike />
|
||||
<flux:editor.separator />
|
||||
<flux:editor.bullet />
|
||||
<flux:editor.ordered />
|
||||
<flux:editor.blockquote />
|
||||
<flux:editor.separator />
|
||||
<flux:editor.link />
|
||||
<flux:editor.separator />
|
||||
<flux:editor.align />
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</ui-toolbar>
|
||||
Reference in New Issue
Block a user