The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/plugins/panel/gettingstarted/components/sharedStyles.ts

49 lines
1.6 KiB

import { GrafanaTheme } from '@grafana/data';
import { css } from '@emotion/css';
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;
`;