2020-03-26 04:58:37 +00:00
|
|
|
import React, { useState } from 'react';
|
|
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
2020-07-05 01:46:09 +00:00
|
|
|
import { faUserPlus } from '@fortawesome/free-solid-svg-icons';
|
2020-03-26 04:58:37 +00:00
|
|
|
import EditSubuserModal from '@/components/server/users/EditSubuserModal';
|
2020-07-04 23:26:07 +00:00
|
|
|
import Button from '@/components/elements/Button';
|
|
|
|
import tw from 'twin.macro';
|
2020-03-26 04:58:37 +00:00
|
|
|
|
|
|
|
export default () => {
|
|
|
|
const [ visible, setVisible ] = useState(false);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
2020-07-04 23:26:07 +00:00
|
|
|
{visible && <EditSubuserModal appear visible onDismissed={() => setVisible(false)}/>}
|
|
|
|
<Button onClick={() => setVisible(true)}>
|
|
|
|
<FontAwesomeIcon icon={faUserPlus} css={tw`mr-1`}/> New User
|
|
|
|
</Button>
|
2020-03-26 04:58:37 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|