mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GrafanaUI: IconButton
- replace HorizontalGroup and VerticalGroup with Stack component (#85639)
This commit is contained in:
parent
9efbf142a8
commit
661aaf352e
@ -4,7 +4,7 @@ import React from 'react';
|
||||
|
||||
import { useTheme2 } from '../../themes';
|
||||
import { IconSize, IconName } from '../../types';
|
||||
import { HorizontalGroup, VerticalGroup } from '../Layout/Layout';
|
||||
import { Stack } from '../Layout/Stack/Stack';
|
||||
|
||||
import { BasePropsWithTooltip, IconButton, IconButtonVariant, Props as IconButtonProps } from './IconButton';
|
||||
import mdx from './IconButton.mdx';
|
||||
@ -57,7 +57,7 @@ export const ExamplesSizes = (args: BasePropsWithTooltip) => {
|
||||
});
|
||||
|
||||
return (
|
||||
<HorizontalGroup justify="center">
|
||||
<Stack justifyContent="center">
|
||||
{variants.map((variant) => {
|
||||
return (
|
||||
<div
|
||||
@ -93,7 +93,7 @@ export const ExamplesSizes = (args: BasePropsWithTooltip) => {
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</HorizontalGroup>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
@ -115,7 +115,7 @@ export const ExamplesBackground = (args: BasePropsWithTooltip) => {
|
||||
background: theme.colors.background[background],
|
||||
})}
|
||||
>
|
||||
<VerticalGroup spacing="md">
|
||||
<Stack direction="column" gap={2}>
|
||||
<div>{background}</div>
|
||||
<div
|
||||
className={css({
|
||||
@ -128,7 +128,7 @@ export const ExamplesBackground = (args: BasePropsWithTooltip) => {
|
||||
})}
|
||||
<IconButton name="times" size="xl" tooltip={args.tooltip} disabled />
|
||||
</div>
|
||||
</VerticalGroup>
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user