mirror of
https://github.com/grafana/grafana.git
synced 2025-09-20 19:52:52 +08:00
21 lines
656 B
TypeScript
21 lines
656 B
TypeScript
import { css, cx } from '@emotion/css';
|
|
import React from 'react';
|
|
|
|
import { GrafanaTheme2 } from '@grafana/data';
|
|
import { useStyles2 } from '@grafana/ui';
|
|
import { Button, ButtonProps } from '@grafana/ui/src/components/Button';
|
|
|
|
type Props = Omit<ButtonProps, 'variant' | 'size'>;
|
|
|
|
export const ActionButton = ({ className, ...restProps }: Props) => {
|
|
const styles = useStyles2(getStyle);
|
|
return <Button variant="secondary" size="xs" className={cx(styles.wrapper, className)} {...restProps} />;
|
|
};
|
|
|
|
export const getStyle = (theme: GrafanaTheme2) => ({
|
|
wrapper: css`
|
|
height: 24px;
|
|
font-size: ${theme.typography.bodySmall.fontSize};
|
|
`,
|
|
});
|