mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 13:21:29 +04:00
24 lines
483 B
Plaintext
24 lines
483 B
Plaintext
---
|
|
interface Props {
|
|
mainBtn?: string
|
|
options?: string[]
|
|
}
|
|
|
|
const { mainBtn, options } = Astro.props
|
|
|
|
const optionsArray = options ?? []
|
|
---
|
|
|
|
<div class="dropdown">
|
|
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">{mainBtn}</button>
|
|
<div class="dropdown-menu">
|
|
{
|
|
optionsArray.map((option) => (
|
|
<button type="button" class="dropdown-item">
|
|
{option}
|
|
</button>
|
|
))
|
|
}
|
|
</div>
|
|
</div>
|