import React, { useState } from 'react'; import { FrownOutlined, SmileOutlined } from '@ant-design/icons'; import { Slider } from 'antd'; interface IconSliderProps { max: number; min: number; } const IconSlider: React.FC = (props) => { const { max, min } = props; const [value, setValue] = useState(0); const mid = Number(((max - min) / 2).toFixed(5)); const preColorCls = value >= mid ? '' : 'icon-wrapper-active'; const nextColorCls = value >= mid ? 'icon-wrapper-active' : ''; return (
); }; const App: React.FC = () => ; export default App;