Grafana UI: Dropdown.story.tsx - Replace VerticalGroup with Stack (#86521)

This commit is contained in:
Laura Fernández 2024-04-18 16:13:08 +02:00 committed by GitHub
parent 344cea1725
commit bbf4281d8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View File

@ -797,9 +797,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"packages/grafana-ui/src/components/Dropdown/Dropdown.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/Forms/Checkbox.story.tsx:5381": [
[0, 0, 0, "\'VerticalGroup\' import from \'../Layout/Layout\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
],

View File

@ -4,7 +4,7 @@ import React from 'react';
import { StoryExample } from '../../utils/storybook/StoryExample';
import { Button } from '../Button';
import { IconButton } from '../IconButton/IconButton';
import { VerticalGroup } from '../Layout/Layout';
import { Stack } from '../Layout/Stack/Stack';
import { Menu } from '../Menu/Menu';
import { Dropdown } from './Dropdown';
@ -34,7 +34,7 @@ export function Examples() {
);
return (
<VerticalGroup>
<Stack direction="column">
<StoryExample name="Button + defaults">
<Dropdown overlay={menu}>
<Button variant="secondary">Button</Button>
@ -46,7 +46,7 @@ export function Examples() {
<IconButton tooltip="Open menu" variant="secondary" name="bars" />
</Dropdown>
</StoryExample>
</VerticalGroup>
</Stack>
);
}