mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 01:29:11 +08:00
16 lines
349 B
TypeScript
16 lines
349 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { TimePicker } from 'antd';
|
||
|
import type { Dayjs } from 'dayjs';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [value, setValue] = useState<Dayjs | null>(null);
|
||
|
|
||
|
const onChange = (time: Dayjs) => {
|
||
|
setValue(time);
|
||
|
};
|
||
|
|
||
|
return <TimePicker value={value} onChange={onChange} />;
|
||
|
};
|
||
|
|
||
|
export default App;
|