mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +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;
|