mirror of
https://github.com/tabler/tabler.git
synced 2026-08-27 12:36:28 +04:00
- Mounted in BaseLayout, so the shortcut works on every page - Navbar and sidebar search now open the palette instead of a dead form
22 lines
668 B
Plaintext
22 lines
668 B
Plaintext
---
|
|
// Opens the command palette (see @ui/CommandPalette.astro, mounted in BaseLayout)
|
|
// rather than submitting a search form: one search surface, one result list.
|
|
import Icon from '@ui/Icon.astro'
|
|
|
|
interface Props {
|
|
class?: string
|
|
}
|
|
|
|
const { class: className } = Astro.props
|
|
---
|
|
|
|
<!-- BEGIN NAVBAR SEARCH -->
|
|
<div class={className}>
|
|
<button type="button" class="btn w-100 justify-content-start text-secondary" data-bs-toggle="modal" data-bs-target="#modal-command-palette" aria-label="Search pages and actions">
|
|
<Icon name="search" />
|
|
Search
|
|
<kbd class="ms-auto" data-command-palette-shortcut>⌘K</kbd>
|
|
</button>
|
|
</div>
|
|
<!-- END NAVBAR SEARCH -->
|