mirror of
https://github.com/tabler/tabler.git
synced 2026-10-15 10:46:23 +04:00
`Render Modal as real markup` (#2742) reformatted ~140 files back to tabs/semicolons, breaking the Prettier config added by the Astro quality gates (#2749). Re-run prettier --write to restore it, and fix the type errors it had been masking: HTMLElement casts and `this` typing in ChangePasswordModalContent/ConfirmDeleteModalContent scripts, plain-JS syntax in the inline-injected progress.astro script, narrowed prop unions in Button/Check/Spinner, nullable icon svg casts in Icons/Rating, and a duplicate firstLetters/invalid `placeholder` attribute in Select.astro. Also fix shared/vitest.config.mts's stale `astro/lib/**/*.test.ts` include glob left over from the shared source restructure, which made `pnpm test` report zero test files.
38 lines
1.1 KiB
Plaintext
38 lines
1.1 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 CaptureModal from '../CaptureModal.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). */}
|
|
<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 -->
|
|
|
|
<CaptureModal>
|
|
<Modal modalId="report" size="lg" top>
|
|
<ReportModalContent />
|
|
</Modal>
|
|
</CaptureModal>
|