mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
* Allow sort by more than one key * created custom tooltip component * remove unused code * fixed style for more layouts * added tooltip to query side panel * tooltips added to setting form * finished settings form * added tooltip for perf impact table headers * tooltip for pack table and user form * tooltip on manage policies page * tooltip for manage schedules * tooltip for automations; spacing for form input * tooltip for automations modal * user form; fixed input with icon component * more user form tooltips * tooltip for homepage; style fixes * replaced many more tooltips with new version * added story for tooltip * added position prop * fixed tests * re-work how we click react-select dropdowns * forcing the update button click * trying a blur * fixed typo * trying blur on another element * temp check-in * replaced tooltip from host details software * more consolidation of tooltip use for software * fixed settings flow test Co-authored-by: Tomas Touceda <chiiph@gmail.com>
78 lines
No EOL
1.5 KiB
SCSS
78 lines
No EOL
1.5 KiB
SCSS
.component__tooltip-wrapper {
|
|
position: relative;
|
|
cursor: help;
|
|
|
|
&:hover {
|
|
.component__tooltip-wrapper__tip-text {
|
|
visibility: visible;
|
|
opacity: 1;
|
|
}
|
|
}
|
|
&__element {
|
|
position: static;
|
|
display: inline; // treat like a span but allow other tags as children
|
|
}
|
|
&__underline {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
|
|
&::before {
|
|
content: attr(data-text);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
}
|
|
&::after {
|
|
content: "";
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
bottom: -2px;
|
|
left: 0;
|
|
border-bottom: 1px dashed $ui-fleet-black-50;
|
|
}
|
|
}
|
|
&__tip-text {
|
|
width: max-content;
|
|
max-width: 296px;
|
|
padding: 12px;
|
|
color: $core-white;
|
|
background-color: $core-fleet-blue;
|
|
font-weight: $regular;
|
|
font-size: $xx-small;
|
|
border-radius: 4px;
|
|
position: absolute;
|
|
top: calc(100% + 6px);
|
|
left: 0;
|
|
box-sizing: border-box;
|
|
z-index: 99; // not more than the site nav
|
|
visibility: hidden;
|
|
opacity: 0;
|
|
transition: opacity .3s ease;
|
|
line-height: 1.375;
|
|
|
|
// invisible block to cover space so
|
|
// hover state can continue from text to bubble
|
|
&::before {
|
|
content: "";
|
|
width: 100%;
|
|
height: 6px;
|
|
position: absolute;
|
|
top: -6px;
|
|
left: 0;
|
|
}
|
|
p {
|
|
margin: 0;
|
|
}
|
|
}
|
|
&[data-position="top"] {
|
|
.component__tooltip-wrapper__tip-text {
|
|
top: auto;
|
|
bottom: 100%;
|
|
|
|
&::before {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
} |