// ** React Imports import { Ref, useState, forwardRef, ReactElement, MouseEvent, Fragment } from 'react' // ** MUI Imports import Box from '@mui/material/Box' import Card from '@mui/material/Card' import List from '@mui/material/List' import Menu from '@mui/material/Menu' import Avatar from '@mui/material/Avatar' import Dialog from '@mui/material/Dialog' import Button from '@mui/material/Button' import { Theme } from '@mui/material/styles' import ListItem from '@mui/material/ListItem' import MenuItem from '@mui/material/MenuItem' import TextField from '@mui/material/TextField' import IconButton from '@mui/material/IconButton' import InputLabel from '@mui/material/InputLabel' import Typography from '@mui/material/Typography' import CardContent from '@mui/material/CardContent' import Fade, { FadeProps } from '@mui/material/Fade' import ListItemText from '@mui/material/ListItemText' import Autocomplete from '@mui/material/Autocomplete' import useMediaQuery from '@mui/material/useMediaQuery' import DialogContent from '@mui/material/DialogContent' import ListItemAvatar from '@mui/material/ListItemAvatar' import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction' // ** Icon Imports import Icon from 'src/@core/components/icon' // ** Configs Imports import themeConfig from 'src/configs/themeConfig' // ** Hooks Imports import { useSettings } from 'src/@core/hooks/useSettings' interface DataType { name: string email: string value: string avatar: string } interface OptionsType { name: string avatar: string } const Transition = forwardRef(function Transition( props: FadeProps & { children?: ReactElement }, ref: Ref ) { return }) const data: DataType[] = [ { avatar: '1.png', value: 'Can Edit', name: 'Lester Palmer', email: 'pe@vogeiz.net' }, { avatar: '2.png', value: 'owner', name: 'Mittie Blair', email: 'peromak@zukedohik.gov' }, { avatar: '3.png', value: 'Can Comment', name: 'Marvin Wheeler', email: 'rumet@jujpejah.net' }, { avatar: '4.png', value: 'Can View', name: 'Nannie Ford', email: 'negza@nuv.io' }, { avatar: '5.png', value: 'Can Edit', name: 'Julian Murphy', email: 'lunebame@umdomgu.net' }, { avatar: '6.png', value: 'Can View', name: 'Sophie Gilbert', email: 'ha@sugit.gov' }, { avatar: '7.png', value: 'Can Comment', name: 'Chris Watkins', email: 'zokap@mak.org' }, { avatar: '8.png', value: 'Can Edit', name: 'Adelaide Nichols', email: 'ujinomu@jigo.com' } ] const options: OptionsType[] = [ { avatar: '1.png', name: 'Chandler Bing' }, { avatar: '2.png', name: 'Rachel Green' }, { avatar: '3.png', name: 'Joey Tribbiani' }, { avatar: '4.png', name: 'Pheobe Buffay' }, { avatar: '5.png', name: 'Ross Geller' }, { avatar: '8.png', name: 'Monica Geller' } ] const DialogShareProject = () => { // ** States const [show, setShow] = useState(false) const [anchorEl, setAnchorEl] = useState(null) // ** Hooks const { settings } = useSettings() const hidden = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm')) // ** Var const { direction } = settings const handleClick = (event: MouseEvent) => { setAnchorEl(event.currentTarget) } const handleClose = () => { setAnchorEl(null) } return ( Share Project Elegant Share Project options modal popup example, easy to use in any page. setShow(false)} TransitionComponent={Transition} onBackdropClick={() => setShow(false)} > [`${theme.spacing(5)} !important`, `${theme.spacing(15)} !important`], py: theme => [`${theme.spacing(8)} !important`, `${theme.spacing(12.5)} !important`] }} > setShow(false)} sx={{ position: 'absolute', right: '1rem', top: '1rem' }} > Share Project Share project with a team members Add Members option.name || ''} renderInput={params => } renderOption={(props, option) => ( )} /> {`${data.length} Members`} {data.map(member => { return ( {hidden ? ( ) : ( )} ) })} {`Public to ${themeConfig.templateName} - Pixinvent`} Owner Can Edit Can Comment Can View ) } export default DialogShareProject