ant-design/components/slider/demo/event.tsx
二货爱吃白萝卜 05878dd300
feat: Slider support multiple points (#45000)
* feat: slider support multiple & classNames

* test: update snapshot

* chore: fix lint
2023-09-22 14:19:53 +08:00

26 lines
534 B
TypeScript

import React from 'react';
import { Slider } from 'antd';
const onChange = (value: number | number[]) => {
console.log('onChange: ', value);
};
const onAfterChange = (value: number | number[]) => {
console.log('onAfterChange: ', value);
};
const App: React.FC = () => (
<>
<Slider defaultValue={30} onChange={onChange} onAfterChange={onAfterChange} />
<Slider
range
step={10}
defaultValue={[20, 50]}
onChange={onChange}
onAfterChange={onAfterChange}
/>
</>
);
export default App;