@props(['labels' => false]) @php $opts = ['light' => ['☀', __('明亮模式')], 'dark' => ['🌙', __('深色模式')], 'system' => ['🖥', __('跟隨系統')]]; @endphp {{-- 三態明暗切換:☀ 明亮 / 🌙 深色 / 🖥 跟隨系統。沒有 JS 時是一般表單 POST(redirect back);有 JS 時用 fetch 即時切換不重載。 --}}
merge(['class' => 'inline-flex items-center rounded-full border border-ink-600 p-0.5 text-sm']) }}> @csrf @foreach ($opts as $value => [$icon, $label]) @endforeach