1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Invert invisible prop

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-01-19 12:58:58 +03:00
parent 4553e58b69
commit e4a6b4f65d
2 changed files with 8 additions and 7 deletions

View File

@ -25,14 +25,15 @@
pointer-events: none;
transition: opacity 150ms 150ms ease-in-out;
z-index: 100000;
opacity: 1;
box-shadow: 0 8px 16px rgba(0,0,0,0.24);
left: 0;
top: 0;
opacity: 0;
visibility: hidden;
&.invisible {
left: 0;
top: 0;
opacity: 0;
visibility: hidden;
&.visible {
opacity: 1;
visibility: visible;
}
&:empty {

View File

@ -216,7 +216,7 @@ export class Tooltip extends React.Component<TooltipProps> {
render() {
const { style, formatters, usePortal, children, visible } = this.props;
const className = cssNames("Tooltip", this.props.className, formatters, this.activePosition, {
invisible: visible === undefined ? !this.isVisible : !visible,
visible: visible ?? this.isVisible,
formatter: !!formatters,
});
const tooltip = (