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 = (