File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
portal-ui/src/screens/Console/Common/TooltipWrapper Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1414// You should have received a copy of the GNU Affero General Public License
1515// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
17- import React from "react" ;
17+ import React , { cloneElement } from "react" ;
1818import { Tooltip } from "@mui/material" ;
1919
2020interface ITooltipWrapperProps {
2121 tooltip : string ;
2222 children : any ;
23+ errorProps ?: any ;
2324}
2425
25- const TooltipWrapper = ( { tooltip, children } : ITooltipWrapperProps ) => {
26+ const TooltipWrapper = ( {
27+ tooltip,
28+ children,
29+ errorProps = null ,
30+ } : ITooltipWrapperProps ) => {
2631 return (
2732 < Tooltip title = { tooltip } >
28- < span > { children } </ span >
33+ < span >
34+ { errorProps ? cloneElement ( children , { ...errorProps } ) : children }
35+ </ span >
2936 </ Tooltip >
3037 ) ;
3138} ;
You can’t perform that action at this time.
0 commit comments