Added all files successfully converted
This commit is contained in:
35
src/components/party/AddPartyMemberButton.tsx
Normal file
35
src/components/party/AddPartyMemberButton.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React, { useState } from "react";
|
||||
import { IconButton } from "theme-ui";
|
||||
|
||||
import AddPartyMemberModal from "../../modals/AddPartyMemberModal";
|
||||
import AddPartyMemberIcon from "../../icons/AddPartyMemberIcon";
|
||||
|
||||
function AddPartyMemberButton({ gameId }: { gameId: string }) {
|
||||
const [isAddModalOpen, setIsAddModalOpen] = useState(false);
|
||||
function openModal() {
|
||||
setIsAddModalOpen(true);
|
||||
}
|
||||
function closeModal() {
|
||||
setIsAddModalOpen(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<IconButton
|
||||
m={1}
|
||||
aria-label="Add Party Member"
|
||||
title="Add Party Member"
|
||||
onClick={openModal}
|
||||
>
|
||||
<AddPartyMemberIcon />
|
||||
</IconButton>
|
||||
<AddPartyMemberModal
|
||||
isOpen={isAddModalOpen}
|
||||
onRequestClose={closeModal}
|
||||
gameId={gameId}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default AddPartyMemberButton;
|
||||
Reference in New Issue
Block a user