feat: Upgrade template based on projects made with it
Some checks failed
Build, check & Test / run (push) Failing after 42s
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:
30
src/components/global/Range.astro
Normal file
30
src/components/global/Range.astro
Normal 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>
|
Reference in New Issue
Block a user