Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
32 lines
940 B
JavaScript
32 lines
940 B
JavaScript
import Typography from '@mui/material/Typography';
|
|
import Button from '@mui/material/Button';
|
|
import Popover from '@mui/material/Popover';
|
|
import PopupState, { bindTrigger, bindPopover } from 'material-ui-popup-state';
|
|
|
|
export default function PopoverPopupState() {
|
|
return (
|
|
<PopupState variant="popover" popupId="demo-popup-popover">
|
|
{(popupState) => (
|
|
<div>
|
|
<Button variant="contained" {...bindTrigger(popupState)}>
|
|
Open Popover
|
|
</Button>
|
|
<Popover
|
|
{...bindPopover(popupState)}
|
|
anchorOrigin={{
|
|
vertical: 'bottom',
|
|
horizontal: 'center',
|
|
}}
|
|
transformOrigin={{
|
|
vertical: 'top',
|
|
horizontal: 'center',
|
|
}}
|
|
>
|
|
<Typography sx={{ p: 2 }}>The content of the Popover.</Typography>
|
|
</Popover>
|
|
</div>
|
|
)}
|
|
</PopupState>
|
|
);
|
|
}
|