replaced raw tooltip implementation for remix-ui-checkbox

pull/3081/head
Joseph Izang 2 years ago
parent 0a94d45238
commit 52e0b87b0d
  1. 23
      libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx

@ -1,3 +1,4 @@
import { CustomTooltip } from '@remix-ui/helper';
import React, { CSSProperties } from 'react' //eslint-disable-line
import { OverlayProps, OverlayTrigger, OverlayTriggerProps, Tooltip } from 'react-bootstrap'// eslint-disable-line
import './remix-ui-checkbox.css'
@ -36,15 +37,8 @@ export const RemixUiCheckbox = ({
display = 'flex',
tooltipPlacement = 'right-start'
}: RemixUiCheckboxProps) => {
return (
<OverlayTrigger
placement={tooltipPlacement}
overlay={
<Tooltip id={`${name}Tooltip`}>
<span>{title}</span>
</Tooltip>
}
>
const childJSX = (
<div className="listenOnNetwork_2A0YE0 custom-control custom-checkbox" style={{ display: display, alignItems: 'center', visibility: visibility } as CSSProperties } onClick={onClick}>
<input
id={id}
@ -60,7 +54,16 @@ export const RemixUiCheckbox = ({
{label}
</label>
</div>
</OverlayTrigger>
)
return (
<CustomTooltip
tooltipText={title}
tooltipId={`${name}Tooltip`}
placement={tooltipPlacement}
>
{childJSX}
</CustomTooltip>
)
}

Loading…
Cancel
Save