1.0.2 • Published 2 years ago

react-mui-tooltip-ifz v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

propstypedescription
alwaysbooleandefault: false: show if text is overflow
bootstrapCssbooleandefault: true: arrow and color like bootstrapCss

Note

RUN

LIVE EXAMPLE

License

MIT