mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-10 06:52:05 +01:00
Fix bugs in tooltip icon
This commit is contained in:
@@ -78,13 +78,6 @@ a.hashLink { font-size: 1.1em;}
|
|||||||
.indicator { padding: 0px 5px; background: transparent; border: none; cursor: pointer; vertical-align: middle; color:rgba(0, 0, 0, 0.25) }
|
.indicator { padding: 0px 5px; background: transparent; border: none; cursor: pointer; vertical-align: middle; color:rgba(0, 0, 0, 0.25) }
|
||||||
|
|
||||||
|
|
||||||
.tooltip-holder { position: relative; display: inline}
|
|
||||||
.tooltip-holder .tooltip {display: none; font-size: 0.9em; position: absolute; margin-left: 10px; width: 300px; padding: 10px; border-radius: 5px;}
|
|
||||||
.tooltip-holder .tooltip p { margin-bottom: 0;}
|
|
||||||
.tooltip-holder .tooltip .tooltip-header { font-weight: bold; margin-bottom: 5px;}
|
|
||||||
.tooltip:hover { display: inline;}
|
|
||||||
.tooltip-holder:hover .tooltip { display: inline; }
|
|
||||||
|
|
||||||
.error { color: maroon; }
|
.error { color: maroon; }
|
||||||
|
|
||||||
.soft { opacity: 0.7 }
|
.soft { opacity: 0.7 }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.vpc-view .host-part {
|
.vpc-view .host-part {
|
||||||
color: darkcyan;
|
color: coral;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vpc-view .subnet-part {
|
.vpc-view .subnet-part {
|
||||||
@@ -47,4 +47,8 @@
|
|||||||
|
|
||||||
.vpc-view .address-container {
|
.vpc-view .address-container {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vpc-view .tooltip-icon {
|
||||||
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
37
src/shell/components/IconWithTooltip.css
Normal file
37
src/shell/components/IconWithTooltip.css
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
.tooltip-holder {
|
||||||
|
position: relative;
|
||||||
|
display: inline
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-holder .tooltip-icon {
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-holder .tooltip {
|
||||||
|
display: none;
|
||||||
|
font-size: 0.9em;
|
||||||
|
position: absolute;
|
||||||
|
margin-left: 5px;
|
||||||
|
width: 300px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-holder .tooltip p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-holder .tooltip .tooltip-header {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-holder:hover .tooltip {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import "./IconWithTooltip.css";
|
||||||
|
|
||||||
export type IconWithToolTipProps = {
|
export type IconWithToolTipProps = {
|
||||||
icon: IconProp
|
icon: IconProp
|
||||||
@@ -7,7 +8,7 @@ export type IconWithToolTipProps = {
|
|||||||
|
|
||||||
function IconWithToolTip (props: React.PropsWithChildren<IconWithToolTipProps>) {
|
function IconWithToolTip (props: React.PropsWithChildren<IconWithToolTipProps>) {
|
||||||
return <div className='tooltip-holder'>
|
return <div className='tooltip-holder'>
|
||||||
<button><FontAwesomeIcon icon={props.icon} /></button>
|
<span className="tooltip-icon"><FontAwesomeIcon icon={props.icon} /></span>
|
||||||
|
|
||||||
<div className='tooltip solid-border solid-background'>
|
<div className='tooltip solid-border solid-background'>
|
||||||
{props.children}
|
{props.children}
|
||||||
|
|||||||
Reference in New Issue
Block a user