react-mui-tooltip-ifz
v1.0.2
Published
React Mui-Tooltip if need (truncate)
Downloads
58
Maintainers
Readme
Description
React MUI (v.5). Show tooltip if need. (truncate)
Usage
Install the package
npm install --save react-mui-tooltip-ifz
Import the module in the place you want to use:
import { MuiTooltipIfNeed } from "react-mui-tooltip-ifz";
Snippet
simple
<MuiTooltipIfNeed title="abdc">
{/* <div>fdsfs</div> */}
<Button
variant="contained"
className="abcd"
style={{
width: 200 // => you should update it from css class
}}
onClick={() => setSize(400)}
onDoubleClick={() => setSize(200)}
>
Hellofds fdsfsfsfdsdf fdsf s
</Button>
</MuiTooltipIfNeed>
props
TooltipProps: from react: @mui/material
| props | type | description | |---------------------|---------------------------|--------------------------------------------------| | always | boolean | default: false: show if text is overflow | | bootstrapCss | boolean | default: true: arrow and color like bootstrapCss |
Note
RUN
LIVE EXAMPLE
License
MIT