1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-07 03:42:27 +04:00
Files
tabler/shared/ui/DropdownDays.astro
2026-08-03 00:55:32 +02:00

19 lines
680 B
Plaintext

---
interface Props {
id?: string
label?: string
value?: string
}
const { id, label = 'Select time range', value = 'Last 7 days' } = Astro.props
---
<div class="dropdown">
<a class="dropdown-toggle text-secondary" id={id ? `${id}-dropdown` : undefined} href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label={label}>{value}</a>
<div class="dropdown-menu dropdown-menu-end" aria-labelledby={id ? `${id}-dropdown` : undefined}>
<a class="dropdown-item active" href="#" aria-current="true">Last 7 days</a>
<a class="dropdown-item" href="#">Last 30 days</a>
<a class="dropdown-item" href="#">Last 3 months</a>
</div>
</div>