hm-react-cli
Version:
Create a Huimei React project by module
24 lines (21 loc) • 644 B
JavaScript
import { Slider, InputNumber, Row, Col } from 'antd';
import { useState } from 'react';
export default function () {
const [inputValue, setInputValue] = useState(0);
return (
<Row>
<Col span={12}>
<Slider min={1} max={20} onChange={setInputValue} value={inputValue} />
</Col>
<Col span={4}>
<InputNumber
min={1}
max={20}
style={{ marginLeft: '16px' }}
value={inputValue}
onChange={setInputValue}
/>
</Col>
</Row>
);
}