mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 16:39:41 +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;
|