2021-03-15 12:17:56 +00:00
|
|
|
import { createGlobalStyle } from "styled-components";
|
|
|
|
|
import { Theme } from "constants/DefaultTheme";
|
|
|
|
|
import { Classes } from "@blueprintjs/core";
|
|
|
|
|
import { Classes as CsClasses } from "components/ads/common";
|
|
|
|
|
|
|
|
|
|
export const GLOBAL_STYLE_TOOLTIP_CLASSNAME = "ads-global-tooltip";
|
|
|
|
|
|
|
|
|
|
export const TooltipStyles = createGlobalStyle<{
|
|
|
|
|
theme: Theme;
|
|
|
|
|
}>`
|
|
|
|
|
.${Classes.PORTAL} {
|
|
|
|
|
.${Classes.TOOLTIP}.${GLOBAL_STYLE_TOOLTIP_CLASSNAME} {
|
2021-08-17 11:08:04 +00:00
|
|
|
max-width: 350px;
|
2021-10-21 04:37:34 +00:00
|
|
|
overflow-wrap: anywhere;
|
2021-03-15 12:17:56 +00:00
|
|
|
.${Classes.POPOVER_CONTENT} {
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
background-color: ${(props) => props.theme.colors.tooltip.darkBg};
|
|
|
|
|
color: ${(props) => props.theme.colors.tooltip.darkText};
|
|
|
|
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2), 0px 2px 10px rgba(0, 0, 0, 0.1);
|
|
|
|
|
}
|
|
|
|
|
div.${Classes.POPOVER_ARROW} {
|
|
|
|
|
path {
|
|
|
|
|
fill: ${(props) => props.theme.colors.tooltip.darkBg};
|
|
|
|
|
stroke: ${(props) => props.theme.colors.tooltip.darkBg};
|
|
|
|
|
}
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
.${CsClasses.BP3_POPOVER_ARROW_BORDER},
|
|
|
|
|
.${CsClasses.BP3_POPOVER_ARROW_FILL} {
|
|
|
|
|
fill: ${(props) => props.theme.colors.tooltip.darkBg};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
`;
|