mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 13:17:00 +04:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
15 lines
502 B
Plaintext
15 lines
502 B
Plaintext
---
|
|
// IMask initializes from the data-mask attributes (tabler.js).
|
|
interface Props {
|
|
mask?: string
|
|
visible?: boolean
|
|
placeholder?: string
|
|
reverse?: boolean
|
|
}
|
|
|
|
const { mask = '00/00/0000', visible, placeholder, reverse } = Astro.props
|
|
const name = 'mask'
|
|
---
|
|
|
|
<input type="text" name={`input-${name}`} class="form-control" data-mask={mask} data-mask-visible={visible ? 'true' : undefined} placeholder={placeholder ?? mask} data-mask-reverse={reverse ? 'true' : undefined} autocomplete="off" />
|