feat: Upgrade template based on projects made with it
Some checks failed
Build, check & Test / run (push) Failing after 42s

Signed-off-by: Florian Bouillon <f.bouillon@aptatio.com>
This commit is contained in:
2023-10-09 11:47:11 +02:00
parent bf06e41238
commit e26b4eb4a5
42 changed files with 934 additions and 136 deletions

View File

@ -0,0 +1,30 @@
---
import { objectOmit } from '@dzeio/object-util'
interface Props extends Omit<astroHTML.JSX.InputHTMLAttributes, 'type'> {
label?: string
block?: boolean
}
const baseProps = objectOmit(Astro.props, 'label', 'block')
---
<div class:list={[{parent: Astro.props.block}]}>
{Astro.props.label && (
<label for={Astro.props.name}>{Astro.props.label}</label>
)}
<input type="range" class="input" {...baseProps as any} />
</div>
<style>
.parent {
@apply w-full
}
input[type='range'] {
@apply appearance-none bg-gray-200 rounded-full h-1 w-full
}
input[type='range']::-webkit-slider-thumb,
input[type='range']::-moz-range-thumb {
@apply appearance-none bg-amber-600 w-4 h-4 border-0
}
</style>