AI & workflows
Workspace Toolbar code
Copy the implementation or inspect every file that belongs to this component unit.
resources/views/components/ui/workspace-toolbar.blade.php
@props([
'backHref' => null,
'backLabel' => 'Back',
])
@php
/*
| Workspace header row: back link on the left, meta/actions on the right.
|
| Usage:
| <x-ui.workspace-toolbar :back-href="route('ai.loops.index')" back-label="All loops">
| <x-slot:actions>
| <x-ui.button href="...">New loop</x-ui.button>
| </x-slot:actions>
| </x-ui.workspace-toolbar>
*/
@endphp
<div {{ $attributes->merge(['class' => 'flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between']) }}>
@if ($backHref)
<x-ui.button :href="$backHref" variant="ghost" size="sm" icon="arrow-left">
{{ $backLabel }}
</x-ui.button>
@else
<div></div>
@endif
<div class="flex flex-wrap items-center gap-2">
@isset($meta)
{{ $meta }}
@endisset
@isset($actions)
{{ $actions }}
@endisset
</div>
</div>