misc_pterodactyl-panel/resources/scripts/components/server/users/AddSubuserButton.tsx

20 lines
696 B
TypeScript
Raw Permalink Normal View History

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';
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';
export default () => {
const [ visible, setVisible ] = useState(false);
return (
<>
<EditSubuserModal visible={visible} onModalDismissed={() => setVisible(false)}/>
2020-07-04 23:26:07 +00:00
<Button onClick={() => setVisible(true)}>
<FontAwesomeIcon icon={faUserPlus} css={tw`mr-1`}/> New User
</Button>
</>
);
};