Files
siakad/resources/views/components/ui/theme-toggle.blade.php
T
2026-10-24 11:45:32 +07:00

14 lines
580 B
PHP

{{-- Tombol ganti tema terang/gelap. Pilihan disimpan di peramban; tanpa JS tombol disembunyikan. --}}
<button
type="button"
{{ $attributes->class('theme-toggle js-only') }}
x-data="themeToggle"
x-on:click="toggle($event)"
x-bind:aria-label="dark ? 'Ganti ke tema terang' : 'Ganti ke tema gelap'"
x-bind:title="dark ? 'Tema terang' : 'Tema gelap'"
aria-label="Ganti tema"
>
<span class="theme-toggle__moon" aria-hidden="true"><x-heroicon-o-moon /></span>
<span class="theme-toggle__sun" aria-hidden="true"><x-heroicon-o-sun /></span>
</button>