Add basic modal support
This commit is contained in:
parent
bb3486f559
commit
61dc86421d
4 changed files with 85 additions and 7 deletions
|
@ -0,0 +1,18 @@
|
|||
import React, { useState } from 'react';
|
||||
import { ServerDatabase } from '@/api/server/getServerDatabases';
|
||||
import Modal from '@/components/elements/Modal';
|
||||
|
||||
export default ({ onCreated }: { onCreated: (database: ServerDatabase) => void }) => {
|
||||
const [ visible, setVisible ] = useState(false);
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Modal visible={visible} onDismissed={() => setVisible(false)}>
|
||||
<p>Testing</p>
|
||||
</Modal>
|
||||
<button className={'btn btn-primary btn-lg'} onClick={() => setVisible(true)}>
|
||||
Create Database
|
||||
</button>
|
||||
</React.Fragment>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue