Grafana UI: Text.story.tsx - Replace VerticalGroup with Stack (#86584)

This commit is contained in:
Laura Fernández
2024-04-19 16:01:24 +02:00
committed by GitHub
parent 53f5663714
commit 913d7da3af
2 changed files with 3 additions and 6 deletions

View File

@@ -955,9 +955,6 @@ exports[`better eslint`] = {
"packages/grafana-ui/src/components/Tags/Tag.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"packages/grafana-ui/src/components/Text/Text.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/ValuePicker/ValuePicker.tsx:5381": [
[0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"]
],

View File

@@ -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';
import mdx from './Text.mdx';
@@ -60,7 +60,7 @@ const meta: Meta = {
export const Example: StoryFn = (args) => {
return (
<VerticalGroup>
<Stack direction="column">
<StoryExample name="Header, paragraph and span">
<Text {...args} element="h1">
This is a header
@@ -84,7 +84,7 @@ export const Example: StoryFn = (args) => {
but has truncate set to true
</Text>
</StoryExample>
</VerticalGroup>
</Stack>
);
};