mirror of
https://github.com/tabler/tabler.git
synced 2026-11-03 05:28:42 +04:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
---
|
|
import Button from '@ui/Button.astro'
|
|
import ButtonList from '@ui/ButtonList.astro'
|
|
import Icon from '@ui/Icon.astro'
|
|
import Modal from '../modals/Modal.astro'
|
|
import ReportModalContent from '../modals/ReportModalContent.astro'
|
|
|
|
interface Props {
|
|
/** layout-navbar-overlap && layout-navbar-dark → the "New view" button is color="dark" */
|
|
dark?: boolean
|
|
}
|
|
|
|
const { dark } = Astro.props
|
|
---
|
|
|
|
<!-- BEGIN HEADER ACTIONS -->
|
|
<ButtonList>
|
|
<span class="d-none d-sm-inline">
|
|
<Button text="New view" color={dark ? 'dark' : undefined} />
|
|
</span>
|
|
{
|
|
/* Button.astro doesn't support modal-id (data-bs-toggle/target), so these two
|
|
buttons are reproduced directly from the ui/button.html output. */
|
|
}
|
|
<a href="#" class="btn btn-primary d-none d-sm-inline-block" data-bs-toggle="modal" data-bs-target="#modal-report">
|
|
<Icon name="plus" />
|
|
Create new report
|
|
</a>
|
|
<a href="#" class="btn btn-primary d-sm-none btn-icon" data-bs-toggle="modal" data-bs-target="#modal-report" aria-label="Create new report">
|
|
<Icon name="plus" />
|
|
</a>
|
|
</ButtonList>
|
|
<!-- END HEADER ACTIONS -->
|
|
|
|
<!-- BEGIN MODAL -->
|
|
<Modal modalId="report" size="lg" top>
|
|
<ReportModalContent />
|
|
</Modal>
|
|
<!-- END MODAL -->
|