docs: add comment for TooltipChild
This commit is contained in:
parent
21caaa7009
commit
6f05295cd0
@ -1,5 +1,10 @@
|
|||||||
import { forwardRef, PropsWithChildren } from 'react'
|
import { forwardRef, PropsWithChildren } from 'react'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper wrapper for custom child components when using `@mui/material/tooltips`.
|
||||||
|
* Mui Tooltip works out-the-box with other `@mui` components but when using custom they require ref.
|
||||||
|
* @source https://mui.com/material-ui/react-tooltip/#custom-child-element
|
||||||
|
*/
|
||||||
export const TooltipChild = forwardRef<HTMLSpanElement, PropsWithChildren>(
|
export const TooltipChild = forwardRef<HTMLSpanElement, PropsWithChildren>(
|
||||||
({ children, ...rest }, ref) => {
|
({ children, ...rest }, ref) => {
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user