From 466cbe69ecfb824cf025255547e22de259912833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Bedi?= Date: Tue, 26 Sep 2023 11:11:03 +0200 Subject: [PATCH] Revert ActionButton changes --- src/components/ActionButton/ActionButton.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/ActionButton/ActionButton.tsx b/src/components/ActionButton/ActionButton.tsx index 99f5b4c..333fc77 100644 --- a/src/components/ActionButton/ActionButton.tsx +++ b/src/components/ActionButton/ActionButton.tsx @@ -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): void; } -export const ActionButton = ({ icon, width, tooltip, className, children, onClick }: PropsWithChildren) => { +export const ActionButton: FC> = ({ 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 = (