mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
17 lines
548 B
Plaintext
17 lines
548 B
Plaintext
---
|
|
interface Props {
|
|
text: string
|
|
/** hr-text-{position} (core/scss/ui/typo/_hr.scss); center is the default look and emits no class */
|
|
position?: 'start' | 'center' | 'end' | undefined
|
|
class?: string
|
|
/** remaining attributes (id, data-*, aria-*, …) are forwarded to the root element */
|
|
[key: string]: unknown
|
|
}
|
|
|
|
const { text, position, class: className, ...rest } = Astro.props
|
|
|
|
const classes = ['hr-text', position && position !== 'center' && `hr-text-${position}`, className]
|
|
---
|
|
|
|
<div class:list={classes} {...rest}>{text}</div>
|