Skip to content

Commit 9295636

Browse files
committed
Added a Method to Close the Card
1 parent 6f2b318 commit 9295636

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

frontend/family_tree/src/Components/ProfileCard.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,17 @@ const useStyles = makeStyles((theme) => ({
4444

4545
function PCard(props) {
4646
const classes = useStyles();
47+
const [display, setDisplay] = React.useState("");
4748

4849
return (
4950
<React.Fragment>
50-
<Card className={classes.root} variant="outlined">
51+
<Card className={classes.root} variant="outlined" style={{display:display}}>
5152
<Box sx={{ display: "flex", justifyContent: "right" }}>
52-
<IconButton aria-label="close">
53+
<CardActions>
54+
<IconButton aria-label="close" onClick={()=>setDisplay("none")} >
5355
<CloseOutlinedIcon />
5456
</IconButton>
57+
</CardActions>
5558
</Box>
5659
<Box
5760
sx={{

0 commit comments

Comments
 (0)