Αποτελέσματα Αναζήτησης
MUI v5 Update. You can customize the Tooltip by overriding the styles in the tooltip slot. There are 3 ways to do that in v5. For reference, see the customization section of Tooltip. More examples of sx prop and createTheme can be seen here and here. styled()
30 Μαρ 2020 · I implemented a tooltip with Material UI but the fontSize is too small. And I can't change it with a .scss. import React from "react"; import "./InfoTooltip.scss"; import InfoIcon
18 Αυγ 2019 · You can customize the tooltip's margin using withStyles. In my case (Material-UI 3), the tooltip was too far away from the anchor. Here is what I needed : const StyledTooltip = withStyles({ tooltipPlacementTop: { margin: "4px 0", }, })(Tooltip); I targeted tooltipPlacementTop because it was the rule name when using the placement="top" prop.
Oh, I see. This is more a React question, you may want to ask that question separately for more details. In this scenario, Tooltip (Component X) has its inner state "open", which you can change via props. Now, ControlledTooltip (Component Y), passes its state "open" to the Tooltip prop "open", thus controlling Tooltip.
1 Ιουλ 2020 · I would like to add a custom style for Material UI tooltip arrow but I can not set the border color and the background color. This is the configuration I have - react: const useStylesBootstrap =
12 Φεβ 2023 · You can do this by accessing the PopperProps in the Tooltip component. The documentation for this is a little buried, but Tooltip has access to all MUI Popper component properties, which contain the popperOptions. Within the API properties definitions for the Popper component, MUI refers you to popper.js docs.
I need to be able to add a tooltip to the element so it functions like normal (opens up when element is hovered) and at the same time I need an ability to open it up programmatically. I know it has open prop that allows to do so, but in this case I will be switching component from uncontrolled to controlled and this isn't possible.
16 Αυγ 2019 · Your Tooltip is not working properly because the child of a Material-UI Tooltip must be able to hold a ref. The following can hold a ref: Any Material-UI component; class components i.e. React.Component or React.PureComponent; DOM (or host) components e.g. div or button; React.forwardRef components; React.lazy components; React.memo components
21 Ιουν 2019 · I am currently developing a React component that leverages the Material UI Tooltip component. Within my component, I need to manually re-position the Mui Tooltip via the root popper element (MuiTooltip-popper). But, the Mui Tooltip is rendered with a handful of inline CSS properties out-of-the-box:
9 Μαρ 2020 · I am using the ToolTip component, I have two texts for the title, just wonder is that possible to render them as two lines (each language in one line) rather than one line?