mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Add basic modal support
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user