Grafana UI: TextLink.story.tsx - Replace VerticalGroup with Stack (#86526)

This commit is contained in:
Laura Fernández
2024-04-18 16:37:48 +02:00
committed by GitHub
parent 28a683cf28
commit 18bd11ca6a
2 changed files with 4 additions and 7 deletions
-3
View File
@@ -829,9 +829,6 @@ exports[`better eslint`] = {
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"],
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"]
],
"packages/grafana-ui/src/components/Link/TextLink.story.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"packages/grafana-ui/src/components/MatchersUI/FieldValueMatcher.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -2,7 +2,7 @@ import { Meta, StoryFn } from '@storybook/react';
import React from 'react';
import { StoryExample } from '../../utils/storybook/StoryExample';
import { VerticalGroup } from '../Layout/Layout';
import { Stack } from '../Layout/Stack/Stack';
import { Text } from '../Text/Text';
import { TextLink } from './TextLink';
@@ -41,7 +41,7 @@ const meta: Meta = {
export const Example: StoryFn = (args) => {
return (
<VerticalGroup>
<Stack direction="column">
<StoryExample name="This is a 'inline + external' link with the default behaviour">
<Text element="p">
To get started with a forever free Grafana Cloud account, sign up at &#160;
@@ -52,7 +52,7 @@ export const Example: StoryFn = (args) => {
</Text>
</StoryExample>
<StoryExample name="This is a 'standalone + external' link with the default behaviour">
<TextLink href="https://grafana.com/docs/grafana/latest/" {...args}>
<TextLink href="https://grafana.com/docs/grafana/latest/" external inline={false} {...args}>
Learn how in the docs
</TextLink>
</StoryExample>
@@ -60,7 +60,7 @@ export const Example: StoryFn = (args) => {
<Text element="p">
*The examples cannot contemplate an internal link due to conflicts between Storybook and React Router
</Text>
</VerticalGroup>
</Stack>
);
};