Files
Josh Hunt 3c6e0e8ef8 Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00

51 lines
1.6 KiB
TypeScript

import { css } from '@emotion/css';
import { GrafanaTheme } from '@grafana/data';
import { stylesFactory } from '@grafana/ui';
export const cardStyle = stylesFactory((theme: GrafanaTheme, complete: boolean) => {
const completeGradient = 'linear-gradient(to right, #5182CC 0%, #245BAF 100%)';
const darkThemeGradients = complete ? completeGradient : 'linear-gradient(to right, #f05a28 0%, #fbca0a 100%)';
const lightThemeGradients = complete ? completeGradient : 'linear-gradient(to right, #FBCA0A 0%, #F05A28 100%)';
const borderGradient = theme.isDark ? darkThemeGradients : lightThemeGradients;
return `
background-color: ${theme.colors.bg2};
margin-right: ${theme.spacing.xl};
border: 1px solid ${theme.colors.border1};
border-bottom-left-radius: ${theme.border.radius.md};
border-bottom-right-radius: ${theme.border.radius.md};
position: relative;
max-height: 230px;
@media only screen and (max-width: ${theme.breakpoints.xxl}) {
margin-right: ${theme.spacing.md};
}
&::before {
display: block;
content: ' ';
position: absolute;
left: 0;
right: 0;
height: 2px;
top: 0;
background-image: ${borderGradient};
}
`;
});
export const iconStyle = stylesFactory(
(theme: GrafanaTheme, complete: boolean) => css`
color: ${complete ? theme.palette.blue95 : theme.colors.textWeak};
@media only screen and (max-width: ${theme.breakpoints.sm}) {
display: none;
}
`
);
export const cardContent = css`
padding: 16px;
`;