2023-07-25 16:25:36 +03:00
|
|
|
import { PANEL_TYPES } from 'constants/queryBuilder';
|
2023-08-02 20:41:09 +05:30
|
|
|
import { themeColors } from 'constants/theme';
|
2023-07-25 16:25:36 +03:00
|
|
|
import styled, { css, FlattenSimpleInterpolation } from 'styled-components';
|
|
|
|
|
|
2023-08-02 20:41:09 +05:30
|
|
|
import { GraphContainerProps } from './types';
|
|
|
|
|
|
2023-07-25 16:25:36 +03:00
|
|
|
interface Props {
|
2023-07-26 15:06:07 +05:30
|
|
|
$panelType: PANEL_TYPES;
|
2023-07-25 16:25:36 +03:00
|
|
|
}
|
2021-09-23 15:43:43 +05:30
|
|
|
|
|
|
|
|
export const NotFoundContainer = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
min-height: 55vh;
|
|
|
|
|
`;
|
|
|
|
|
|
2023-07-25 16:25:36 +03:00
|
|
|
export const TimeContainer = styled.div<Props>`
|
2021-09-23 15:43:43 +05:30
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
2024-04-02 16:40:41 +05:30
|
|
|
align-items: center;
|
2023-07-25 16:25:36 +03:00
|
|
|
${({ $panelType }): FlattenSimpleInterpolation =>
|
|
|
|
|
$panelType === PANEL_TYPES.TABLE
|
|
|
|
|
? css`
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
`
|
|
|
|
|
: css``}
|
2021-09-23 15:43:43 +05:30
|
|
|
`;
|
2023-08-02 20:41:09 +05:30
|
|
|
|
|
|
|
|
export const GraphContainer = styled.div<GraphContainerProps>`
|
|
|
|
|
height: ${({ isGraphLegendToggleAvailable }): string =>
|
|
|
|
|
isGraphLegendToggleAvailable ? '50%' : '100%'};
|
|
|
|
|
`;
|
|
|
|
|
|
2023-11-29 00:02:51 +05:30
|
|
|
export const LabelContainer = styled.button<{
|
|
|
|
|
isDarkMode?: boolean;
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
}>`
|
2023-08-02 20:41:09 +05:30
|
|
|
max-width: 18.75rem;
|
2023-11-29 00:02:51 +05:30
|
|
|
cursor: ${(props): string => (props.disabled ? 'no-drop' : 'pointer')};
|
2023-08-02 20:41:09 +05:30
|
|
|
border: none;
|
|
|
|
|
background-color: transparent;
|
2023-11-15 15:33:45 +05:30
|
|
|
color: ${(props): string =>
|
|
|
|
|
props.isDarkMode ? themeColors.white : themeColors.black};
|
2023-08-02 20:41:09 +05:30
|
|
|
`;
|