mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Theming: Make new theme exposed by ThemeContext and make new theme include v1 for compatability (to pass to useTheme) (#33207)
* WIP: Making new theme the default * Progress * Updates, lots of updates * Things are working * Fixed issues with storybook * Fixed tests
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import React from 'react';
|
||||
import { Button, InfoBox, Portal, stylesFactory, useTheme } from '@grafana/ui';
|
||||
import { Button, InfoBox, Portal, stylesFactory, useTheme2 } from '@grafana/ui';
|
||||
import { getModalStyles } from '@grafana/ui/src/components/Modal/getModalStyles';
|
||||
import { css, cx } from '@emotion/css';
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { GrafanaThemeV2 } from '@grafana/data';
|
||||
|
||||
interface Props {
|
||||
maxConcurrentSessions?: number;
|
||||
}
|
||||
|
||||
export const TokenRevokedModal = (props: Props) => {
|
||||
const theme = useTheme();
|
||||
const theme = useTheme2();
|
||||
|
||||
const styles = getStyles(theme);
|
||||
const modalStyles = getModalStyles(theme);
|
||||
@@ -50,16 +50,16 @@ export const TokenRevokedModal = (props: Props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||
const getStyles = stylesFactory((theme: GrafanaThemeV2) => {
|
||||
return {
|
||||
infobox: css`
|
||||
margin-bottom: 0;
|
||||
`,
|
||||
text: css`
|
||||
margin: ${theme.spacing.sm} 0 ${theme.spacing.md};
|
||||
margin: ${theme.spacing(1, 0, 2)};
|
||||
`,
|
||||
backdrop: css`
|
||||
background-color: ${theme.colors.dashboardBg};
|
||||
background-color: ${theme.palette.background.canvas};
|
||||
opacity: 0.8;
|
||||
`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user