You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
500 B
22 lines
500 B
import React, { FC } from 'react'
|
|
import { useTheme } from '../hooks'
|
|
|
|
interface Props {
|
|
value: number
|
|
onChange: (value: number) => void
|
|
}
|
|
|
|
const Slider: FC<Props> = ({ value, onChange }) => {
|
|
const theme = useTheme()
|
|
return (
|
|
<input
|
|
type="range"
|
|
min="0"
|
|
max="100"
|
|
style={{ backgroundColor: '#ccc' }}
|
|
value={value}
|
|
onChange={e => onChange(parseInt(e.target.value, 10))} />
|
|
)
|
|
}
|
|
|
|
export default Slider
|