Revert ActionButton changes

This commit is contained in:
Zoltán Bedi
2023-09-26 11:11:03 +02:00
parent 50b9a83eec
commit 466cbe69ec

View File

@@ -1,4 +1,4 @@
import React, { PropsWithChildren } from 'react';
import React, { FC, PropsWithChildren } from 'react';
import { cx, css } from '@emotion/css';
import { stylesFactory, useTheme, Tooltip } from '@grafana/ui';
import { GrafanaTheme, GrafanaThemeType } from '@grafana/data';
@@ -12,16 +12,14 @@ interface Props {
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 styles = getStyles(theme);
const buttonClass = cx(
'btn',
styles.button,
css`
width: ${width || 3}rem;
`,
className
css`width: ${width || 3}rem`,
className,
);
let button = (