Skip to content

Commit

Permalink
[docs][material-ui][Popover] Fix description and title of hover inter…
Browse files Browse the repository at this point in the history
…action section (#43290)
  • Loading branch information
ZeeshanTamboli committed Aug 15, 2024
1 parent 7bb72d3 commit 5fefa49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import Popover from '@mui/material/Popover';
import Typography from '@mui/material/Typography';

export default function MouseOverPopover() {
export default function MouseHoverPopover() {
const [anchorEl, setAnchorEl] = React.useState(null);

const handlePopoverOpen = (event) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import Popover from '@mui/material/Popover';
import Typography from '@mui/material/Typography';

export default function MouseOverPopover() {
export default function MouseHoverPopover() {
const [anchorEl, setAnchorEl] = React.useState<HTMLElement | null>(null);

const handlePopoverOpen = (event: React.MouseEvent<HTMLElement>) => {
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/popover/popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ the position of the popover.

{{"demo": "AnchorPlayground.js", "hideToolbar": true}}

## Mouse over interaction
## Mouse hover interaction

This demo demonstrates how to use the `Popover` component and the mouseover event to achieve popover behavior.
This demo demonstrates how to use the `Popover` component with `mouseenter` and `mouseleave` events to achieve popover behavior.

{{"demo": "MouseOverPopover.js"}}
{{"demo": "MouseHoverPopover.js"}}

## Virtual element

Expand Down

0 comments on commit 5fefa49

Please sign in to comment.