|
|
@@ -16,6 +16,12 @@ import { readableDate } from "shared/string_utils";
|
|
|
import { Tooltip, Zoom } from "@material-ui/core";
|
|
|
import CronParser from "cron-parser";
|
|
|
|
|
|
+import {
|
|
|
+ createTheme,
|
|
|
+ MuiThemeProvider,
|
|
|
+ withStyles,
|
|
|
+} from "@material-ui/core/styles";
|
|
|
+
|
|
|
type Props = {
|
|
|
chart: ChartType;
|
|
|
controllers: Record<string, any>;
|
|
|
@@ -24,6 +30,17 @@ type Props = {
|
|
|
closeChartRedirectUrl?: string;
|
|
|
};
|
|
|
|
|
|
+const theme = createTheme({
|
|
|
+ overrides: {
|
|
|
+ MuiTooltip: {
|
|
|
+ tooltip: {
|
|
|
+ backgroundColor: "#3E3F44",
|
|
|
+ border: "1px solid #ffffff33",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+});
|
|
|
+
|
|
|
const Chart: React.FunctionComponent<Props> = ({
|
|
|
chart,
|
|
|
controllers,
|
|
|
@@ -122,25 +139,28 @@ const Chart: React.FunctionComponent<Props> = ({
|
|
|
{chart?.config?.description && (
|
|
|
<>
|
|
|
<Dot style={{ marginLeft: "9px", color: "#ffffff88" }}>•</Dot>
|
|
|
-
|
|
|
- <Tooltip
|
|
|
- TransitionComponent={Zoom}
|
|
|
- placement={"bottom-start"}
|
|
|
- title={
|
|
|
- <div
|
|
|
- style={{
|
|
|
- fontFamily: "Work Sans, sans-serif",
|
|
|
- fontSize: "14px",
|
|
|
- fontWeight: "normal",
|
|
|
- padding: "5px 6px",
|
|
|
- }}
|
|
|
- >
|
|
|
- {chart.config.description as string}
|
|
|
- </div>
|
|
|
- }
|
|
|
- >
|
|
|
- <Description>{chart.config.description}</Description>
|
|
|
- </Tooltip>
|
|
|
+ <MuiThemeProvider theme={theme}>
|
|
|
+ <Tooltip
|
|
|
+ TransitionComponent={Zoom}
|
|
|
+ placement={"bottom-start"}
|
|
|
+ title={
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ fontFamily: "Work Sans, sans-serif",
|
|
|
+ fontSize: "12px",
|
|
|
+ fontWeight: "normal",
|
|
|
+ padding: "5px 6px",
|
|
|
+ color: "#ffffffdd",
|
|
|
+ lineHeight: "16px",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {chart.config.description as string}
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <Description>{chart.config.description}</Description>
|
|
|
+ </Tooltip>
|
|
|
+ </MuiThemeProvider>
|
|
|
</>
|
|
|
)}
|
|
|
</Title>
|
|
|
@@ -201,9 +221,11 @@ const Description = styled.div`
|
|
|
overflow: hidden;
|
|
|
white-space: nowrap;
|
|
|
text-overflow: ellipsis;
|
|
|
- max-width: 200px;
|
|
|
+ max-width: 80%;
|
|
|
color: #ffffff88;
|
|
|
position: relative;
|
|
|
+ font-size: 13px;
|
|
|
+ padding-top: 1px;
|
|
|
`;
|
|
|
|
|
|
const BottomWrapper = styled.div`
|