Revert ActionButton changes
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React, { PropsWithChildren } from 'react';
|
import React, { FC, PropsWithChildren } from 'react';
|
||||||
import { cx, css } from '@emotion/css';
|
import { cx, css } from '@emotion/css';
|
||||||
import { stylesFactory, useTheme, Tooltip } from '@grafana/ui';
|
import { stylesFactory, useTheme, Tooltip } from '@grafana/ui';
|
||||||
import { GrafanaTheme, GrafanaThemeType } from '@grafana/data';
|
import { GrafanaTheme, GrafanaThemeType } from '@grafana/data';
|
||||||
@@ -12,16 +12,14 @@ interface Props {
|
|||||||
onClick(event: React.MouseEvent<HTMLButtonElement>): void;
|
onClick(event: React.MouseEvent<HTMLButtonElement>): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ActionButton = ({ icon, width, tooltip, className, children, onClick }: PropsWithChildren<Props>) => {
|
export const ActionButton: FC<PropsWithChildren<Props>> = ({ icon, width, tooltip, className, children, onClick }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const styles = getStyles(theme);
|
const styles = getStyles(theme);
|
||||||
const buttonClass = cx(
|
const buttonClass = cx(
|
||||||
'btn',
|
'btn',
|
||||||
styles.button,
|
styles.button,
|
||||||
css`
|
css`width: ${width || 3}rem`,
|
||||||
width: ${width || 3}rem;
|
className,
|
||||||
`,
|
|
||||||
className
|
|
||||||
);
|
);
|
||||||
|
|
||||||
let button = (
|
let button = (
|
||||||
|
|||||||
Reference in New Issue
Block a user