{
button {
margin-right: 8px;
margin-left: 8px;
- margin-bottom: 8px;
}
`}
>
{background}
- {variants.map((variant) => {
- return (
-
- {icons.map((icon) => {
- return sizes.map((size) => (
-
-
-
- ));
- })}
-
- );
- })}
+
+ {variants.map((variant) => {
+ return ;
+ })}
+
+
);
diff --git a/packages/grafana-ui/src/components/IconButton/IconButton.tsx b/packages/grafana-ui/src/components/IconButton/IconButton.tsx
index 2eeb1e604d3..a4c1b846c60 100644
--- a/packages/grafana-ui/src/components/IconButton/IconButton.tsx
+++ b/packages/grafana-ui/src/components/IconButton/IconButton.tsx
@@ -1,11 +1,11 @@
import { css, cx } from '@emotion/css';
import React from 'react';
-import { GrafanaTheme2, colorManipulator } from '@grafana/data';
+import { GrafanaTheme2, colorManipulator, deprecationWarning } from '@grafana/data';
-import { useTheme2 } from '../../themes/ThemeContext';
+import { useTheme2, stylesFactory } from '../../themes';
import { getFocusStyles, getMouseFocusStyles } from '../../themes/mixins';
-import { stylesFactory } from '../../themes/stylesFactory';
+import { ComponentSize } from '../../types';
import { IconName, IconSize, IconType } from '../../types/icon';
import { Icon } from '../Icon/Icon';
import { getSvgSize } from '../Icon/utils';
@@ -13,10 +13,12 @@ import { TooltipPlacement, PopoverContent, Tooltip } from '../Tooltip';
export type IconButtonVariant = 'primary' | 'secondary' | 'destructive';
+type LimitedIconSize = ComponentSize | 'xl';
+
export interface Props extends React.ButtonHTMLAttributes