mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 21:28:09 +08:00
17 lines
413 B
TypeScript
17 lines
413 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { Slider, Switch } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [reverse, setReverse] = useState(true);
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
<Slider defaultValue={30} reverse={reverse} />
|
||
|
<Slider range defaultValue={[20, 50]} reverse={reverse} />
|
||
|
Reversed: <Switch size="small" checked={reverse} onChange={setReverse} />
|
||
|
</>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|