Skip to content

Commit

Permalink
Merge pull request #11 from daodaoedu/feature/2.2_partner_profile
Browse files Browse the repository at this point in the history
2.2 partner profile / 夥伴資訊
  • Loading branch information
hsuifang authored Jan 2, 2024
2 parents 47c4b64 + 7212670 commit ca536a8
Show file tree
Hide file tree
Showing 6 changed files with 446 additions and 493 deletions.
68 changes: 68 additions & 0 deletions components/Profile/UserCard/Dropdown.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { useState } from 'react';
import styled from '@emotion/styled';
import { Box, Button, Menu, MenuItem } from '@mui/material';
import MoreVertRoundedIcon from '@mui/icons-material/MoreVertRounded';
import Icon from '@mui/material/Icon';

const StyledMenu = styled((props) => (
<Menu
elevation={0}
anchorOrigin={{
vertical: 'bottom',
horizontal: 'left',
}}
transformOrigin={{
vertical: 'top',
horizontal: 'left',
}}
{...props}
/>
))(() => ({
'& .MuiPaper-root': {
borderRadius: 8,
minWidth: 150,
padding: '12px',
boxShadow: '0px 4px 10px 0px rgba(196, 194, 193, 0.40)',
},
'& .MuiMenu-list': {
padding: '0',
},
'& .MuiMenuItem-root': {
padding: '8px',
},
}));

export default function Dropdown({ sx }) {
const [anchorEl, setAnchorEl] = useState(null);
const open = Boolean(anchorEl);
const handleClick = (event) => {
setAnchorEl(event.currentTarget);
};
const handleClose = () => {
setAnchorEl(null);
};

return (
<Box sx={{ ...sx }}>
<Button
aria-haspopup="true"
aria-expanded={open ? 'true' : undefined}
disableElevation
onClick={handleClick}
sx={{
color: '#536166',
padding: '5px',
minWidth: 'unset',
borderRadius: '100%',
}}
>
<Icon color="#536166" component={MoreVertRoundedIcon} />
</Button>
<StyledMenu anchorEl={anchorEl} open={open} onClose={handleClose}>
<MenuItem onClick={handleClose} disableRipple>
檢舉
</MenuItem>
</StyledMenu>
</Box>
);
}
Loading

1 comment on commit ca536a8

@vercel
Copy link

@vercel vercel bot commented on ca536a8 Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

daodao-f2e – ./

daodao-f2e.vercel.app
daodao-f2e-git-dev-daodaoedu.vercel.app
daodao-f2e-daodaoedu.vercel.app

Please sign in to comment.