feat: [frontend] support vision (#1518)
Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
parent
41d0a8b295
commit
6b15827246
74 changed files with 3159 additions and 339 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import ReactSlider from 'react-slider'
|
||||
import cn from 'classnames'
|
||||
import './style.css'
|
||||
type ISliderProps = {
|
||||
className?: string
|
||||
value: number
|
||||
max?: number
|
||||
min?: number
|
||||
|
|
@ -9,14 +11,14 @@ type ISliderProps = {
|
|||
onChange: (value: number) => void
|
||||
}
|
||||
|
||||
const Slider: React.FC<ISliderProps> = ({ max, min, step, value, disabled, onChange }) => {
|
||||
const Slider: React.FC<ISliderProps> = ({ className, max, min, step, value, disabled, onChange }) => {
|
||||
return <ReactSlider
|
||||
disabled={disabled}
|
||||
value={isNaN(value) ? 0 : value}
|
||||
min={min || 0}
|
||||
max={max || 100}
|
||||
step={step || 1}
|
||||
className="slider"
|
||||
className={cn(className, 'slider')}
|
||||
thumbClassName="slider-thumb"
|
||||
trackClassName="slider-track"
|
||||
onChange={onChange}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue