mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
a0353b237a
commit
b25667223c
@ -73,6 +73,7 @@ Basic.argTypes = {
|
|||||||
paddingBottom: SpacingTokenControl,
|
paddingBottom: SpacingTokenControl,
|
||||||
paddingLeft: SpacingTokenControl,
|
paddingLeft: SpacingTokenControl,
|
||||||
paddingRight: SpacingTokenControl,
|
paddingRight: SpacingTokenControl,
|
||||||
|
direction: { control: 'select', options: ['row', 'row-reverse', 'column', 'column-reverse'] },
|
||||||
display: { control: 'select', options: ['flex', 'block', 'inline', 'none'] },
|
display: { control: 'select', options: ['flex', 'block', 'inline', 'none'] },
|
||||||
backgroundColor: { control: 'select', options: backgroundOptions },
|
backgroundColor: { control: 'select', options: backgroundOptions },
|
||||||
borderStyle: { control: 'select', options: borderStyleOptions },
|
borderStyle: { control: 'select', options: borderStyleOptions },
|
||||||
|
@ -4,7 +4,7 @@ import React, { ElementType, forwardRef, PropsWithChildren } from 'react';
|
|||||||
import { GrafanaTheme2, ThemeSpacingTokens, ThemeShape, ThemeShadows } from '@grafana/data';
|
import { GrafanaTheme2, ThemeSpacingTokens, ThemeShape, ThemeShadows } from '@grafana/data';
|
||||||
|
|
||||||
import { useStyles2 } from '../../../themes';
|
import { useStyles2 } from '../../../themes';
|
||||||
import { AlignItems, FlexProps, JustifyContent } from '../types';
|
import { AlignItems, Direction, FlexProps, JustifyContent } from '../types';
|
||||||
import { ResponsiveProp, getResponsiveStyle } from '../utils/responsiveness';
|
import { ResponsiveProp, getResponsiveStyle } from '../utils/responsiveness';
|
||||||
|
|
||||||
type Display = 'flex' | 'block' | 'inline' | 'inline-block' | 'none';
|
type Display = 'flex' | 'block' | 'inline' | 'inline-block' | 'none';
|
||||||
@ -54,6 +54,7 @@ interface BoxProps extends FlexProps, Omit<React.HTMLAttributes<HTMLElement>, 'c
|
|||||||
|
|
||||||
// Flex Props
|
// Flex Props
|
||||||
alignItems?: ResponsiveProp<AlignItems>;
|
alignItems?: ResponsiveProp<AlignItems>;
|
||||||
|
direction?: ResponsiveProp<Direction>;
|
||||||
justifyContent?: ResponsiveProp<JustifyContent>;
|
justifyContent?: ResponsiveProp<JustifyContent>;
|
||||||
gap?: ResponsiveProp<ThemeSpacingTokens>;
|
gap?: ResponsiveProp<ThemeSpacingTokens>;
|
||||||
|
|
||||||
@ -91,6 +92,7 @@ export const Box = forwardRef<HTMLElement, PropsWithChildren<BoxProps>>((props,
|
|||||||
borderColor,
|
borderColor,
|
||||||
borderStyle,
|
borderStyle,
|
||||||
borderRadius,
|
borderRadius,
|
||||||
|
direction,
|
||||||
justifyContent,
|
justifyContent,
|
||||||
alignItems,
|
alignItems,
|
||||||
boxShadow,
|
boxShadow,
|
||||||
@ -123,6 +125,7 @@ export const Box = forwardRef<HTMLElement, PropsWithChildren<BoxProps>>((props,
|
|||||||
borderColor,
|
borderColor,
|
||||||
borderStyle,
|
borderStyle,
|
||||||
borderRadius,
|
borderRadius,
|
||||||
|
direction,
|
||||||
justifyContent,
|
justifyContent,
|
||||||
alignItems,
|
alignItems,
|
||||||
boxShadow,
|
boxShadow,
|
||||||
@ -188,6 +191,7 @@ const getStyles = (
|
|||||||
borderColor: BoxProps['borderColor'],
|
borderColor: BoxProps['borderColor'],
|
||||||
borderStyle: BoxProps['borderStyle'],
|
borderStyle: BoxProps['borderStyle'],
|
||||||
borderRadius: BoxProps['borderRadius'],
|
borderRadius: BoxProps['borderRadius'],
|
||||||
|
direction: BoxProps['direction'],
|
||||||
justifyContent: BoxProps['justifyContent'],
|
justifyContent: BoxProps['justifyContent'],
|
||||||
alignItems: BoxProps['alignItems'],
|
alignItems: BoxProps['alignItems'],
|
||||||
boxShadow: BoxProps['boxShadow'],
|
boxShadow: BoxProps['boxShadow'],
|
||||||
@ -247,6 +251,9 @@ const getStyles = (
|
|||||||
getResponsiveStyle(theme, backgroundColor, (val) => ({
|
getResponsiveStyle(theme, backgroundColor, (val) => ({
|
||||||
backgroundColor: customBackgroundColor(val, theme),
|
backgroundColor: customBackgroundColor(val, theme),
|
||||||
})),
|
})),
|
||||||
|
getResponsiveStyle(theme, direction, (val) => ({
|
||||||
|
flexDirection: val,
|
||||||
|
})),
|
||||||
getResponsiveStyle(theme, grow, (val) => ({
|
getResponsiveStyle(theme, grow, (val) => ({
|
||||||
flexGrow: val,
|
flexGrow: val,
|
||||||
})),
|
})),
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { Box, Button, Stack, Text } from '@grafana/ui';
|
import { Box, Button, Text } from '@grafana/ui';
|
||||||
import { Trans } from 'app/core/internationalization';
|
import { Trans } from 'app/core/internationalization';
|
||||||
|
|
||||||
export const CallToAction = () => {
|
export const CallToAction = () => {
|
||||||
@ -9,15 +9,13 @@ export const CallToAction = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box padding={5} backgroundColor="secondary">
|
<Box display="flex" padding={5} gap={2} direction="column" alignItems="center" backgroundColor="secondary">
|
||||||
<Stack gap={2} direction="column" alignItems="center">
|
|
||||||
<Text variant="h3" textAlignment="center">
|
<Text variant="h3" textAlignment="center">
|
||||||
<Trans i18nKey="migrate-to-cloud.cta.header">Let us manage your Grafana stack</Trans>
|
<Trans i18nKey="migrate-to-cloud.cta.header">Let us manage your Grafana stack</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
<Button onClick={onClickMigrate}>
|
<Button onClick={onClickMigrate}>
|
||||||
<Trans i18nKey="migrate-to-cloud.cta.button">Migrate this instance to Cloud</Trans>
|
<Trans i18nKey="migrate-to-cloud.cta.button">Migrate this instance to Cloud</Trans>
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { Box, Stack } from '@grafana/ui';
|
import { Box } from '@grafana/ui';
|
||||||
import { t, Trans } from 'app/core/internationalization';
|
import { t, Trans } from 'app/core/internationalization';
|
||||||
|
|
||||||
import { InfoItem } from './InfoItem';
|
import { InfoItem } from './InfoItem';
|
||||||
|
|
||||||
export const InfoPaneLeft = () => {
|
export const InfoPaneLeft = () => {
|
||||||
return (
|
return (
|
||||||
<Box padding={2} backgroundColor="secondary">
|
<Box display="flex" padding={2} gap={2} direction="column" backgroundColor="secondary">
|
||||||
<Stack gap={2} direction="column">
|
|
||||||
<InfoItem
|
<InfoItem
|
||||||
title={t('migrate-to-cloud.what-is-cloud.title', 'What is Grafana Cloud?')}
|
title={t('migrate-to-cloud.what-is-cloud.title', 'What is Grafana Cloud?')}
|
||||||
linkTitle={t('migrate-to-cloud.what-is-cloud.link-title', 'Learn about cloud features')}
|
linkTitle={t('migrate-to-cloud.what-is-cloud.link-title', 'Learn about cloud features')}
|
||||||
@ -16,8 +15,8 @@ export const InfoPaneLeft = () => {
|
|||||||
>
|
>
|
||||||
<Trans i18nKey="migrate-to-cloud.what-is-cloud.body">
|
<Trans i18nKey="migrate-to-cloud.what-is-cloud.body">
|
||||||
Grafana cloud is a fully managed cloud-hosted observability platform ideal for cloud native environments.
|
Grafana cloud is a fully managed cloud-hosted observability platform ideal for cloud native environments.
|
||||||
It's everything you love about Grafana without the overhead of maintaining, upgrading, and supporting
|
It's everything you love about Grafana without the overhead of maintaining, upgrading, and supporting an
|
||||||
an installation.
|
installation.
|
||||||
</Trans>
|
</Trans>
|
||||||
</InfoItem>
|
</InfoItem>
|
||||||
<InfoItem
|
<InfoItem
|
||||||
@ -41,7 +40,6 @@ export const InfoPaneLeft = () => {
|
|||||||
unauthorized access, use, or disclosure.
|
unauthorized access, use, or disclosure.
|
||||||
</Trans>
|
</Trans>
|
||||||
</InfoItem>
|
</InfoItem>
|
||||||
</Stack>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { Box, Stack } from '@grafana/ui';
|
import { Box } from '@grafana/ui';
|
||||||
import { t, Trans } from 'app/core/internationalization';
|
import { t, Trans } from 'app/core/internationalization';
|
||||||
|
|
||||||
import { InfoItem } from './InfoItem';
|
import { InfoItem } from './InfoItem';
|
||||||
|
|
||||||
export const InfoPaneRight = () => {
|
export const InfoPaneRight = () => {
|
||||||
return (
|
return (
|
||||||
<Box padding={2} backgroundColor="secondary">
|
<Box display="flex" direction="column" gap={2} padding={2} backgroundColor="secondary">
|
||||||
<Stack gap={2} direction="column">
|
|
||||||
<InfoItem
|
<InfoItem
|
||||||
title={t('migrate-to-cloud.pdc.title', 'Not all my data sources are on the public internet')}
|
title={t('migrate-to-cloud.pdc.title', 'Not all my data sources are on the public internet')}
|
||||||
linkTitle={t('migrate-to-cloud.pdc.link-title', 'Learn about PDC')}
|
linkTitle={t('migrate-to-cloud.pdc.link-title', 'Learn about PDC')}
|
||||||
@ -39,7 +38,6 @@ export const InfoPaneRight = () => {
|
|||||||
dashboards.
|
dashboards.
|
||||||
</Trans>
|
</Trans>
|
||||||
</InfoItem>
|
</InfoItem>
|
||||||
</Stack>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user