GrafanaUI: PageToolbar.story.tsx - Replace VerticalGroup with Stack (#86581)

This commit is contained in:
Laura Fernández 2024-04-19 12:54:20 +02:00 committed by GitHub
parent 63427ccd98
commit 7404a631f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View File

@ -838,9 +838,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"] [0, 0, 0, "Unexpected any. Specify a different type.", "3"]
], ],
"packages/grafana-ui/src/components/PageLayout/PageToolbar.story.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],
"packages/grafana-ui/src/components/PanelChrome/PanelContext.ts:5381": [ "packages/grafana-ui/src/components/PanelChrome/PanelContext.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"] [0, 0, 0, "Unexpected any. Specify a different type.", "1"]

View File

@ -2,7 +2,7 @@ import { action } from '@storybook/addon-actions';
import { Meta } from '@storybook/react'; import { Meta } from '@storybook/react';
import React from 'react'; import React from 'react';
import { ToolbarButton, VerticalGroup } from '@grafana/ui'; import { ToolbarButton, Stack } from '@grafana/ui';
import { StoryExample } from '../../utils/storybook/StoryExample'; import { StoryExample } from '../../utils/storybook/StoryExample';
import { IconButton } from '../IconButton/IconButton'; import { IconButton } from '../IconButton/IconButton';
@ -17,7 +17,7 @@ const meta: Meta<typeof PageToolbar> = {
export const Examples = () => { export const Examples = () => {
return ( return (
<VerticalGroup> <Stack direction="column">
<StoryExample name="With non clickable title"> <StoryExample name="With non clickable title">
<PageToolbar pageIcon="bell" title="Dashboard"> <PageToolbar pageIcon="bell" title="Dashboard">
<ToolbarButton icon="panel-add" /> <ToolbarButton icon="panel-add" />
@ -50,7 +50,7 @@ export const Examples = () => {
<ToolbarButton>Apply</ToolbarButton> <ToolbarButton>Apply</ToolbarButton>
</PageToolbar> </PageToolbar>
</StoryExample> </StoryExample>
</VerticalGroup> </Stack>
); );
}; };