ActionButton.tsx 588 B

1234567891011121314151617
  1. import { css, cx } from '@emotion/css';
  2. import React, { FC } from 'react';
  3. import { GrafanaTheme } from '@grafana/data';
  4. import { useStyles } from '@grafana/ui';
  5. import { Button, ButtonProps } from '@grafana/ui/src/components/Button';
  6. type Props = Omit<ButtonProps, 'variant' | 'size'>;
  7. export const ActionButton: FC<Props> = ({ className, ...restProps }) => (
  8. <Button variant="secondary" size="xs" className={cx(useStyles(getStyle), className)} {...restProps} />
  9. );
  10. export const getStyle = (theme: GrafanaTheme) => css`
  11. height: 24px;
  12. font-size: ${theme.typography.size.sm};
  13. `;