mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
21 lines
418 B
TypeScript
21 lines
418 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { Button, TimePicker } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [open, setOpen] = useState(false);
|
||
|
|
||
|
return (
|
||
|
<TimePicker
|
||
|
open={open}
|
||
|
onOpenChange={setOpen}
|
||
|
renderExtraFooter={() => (
|
||
|
<Button size="small" type="primary" onClick={() => setOpen(false)}>
|
||
|
OK
|
||
|
</Button>
|
||
|
)}
|
||
|
/>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|