import { HTMLProps, FC } from "react"; import { useTheme } from "styled-components"; import AnimatedSpinnerIcon from "../../Styled/AnimatedSpinnerIcon"; import { ButtonProps } from "../../Styled/Button"; import { IconGlyph, StyledIcon } from "../../Styled/Icon"; import StyledButton from "./StyledButton"; export interface ActionButtonProps extends Omit< ButtonProps & HTMLProps, "iconProps" | "renderIcon" > { className?: string; icon?: IconGlyph; showProcessingIcon?: boolean; } /** * A themed button to use inside {@link ActionBar} */ export const ActionButton: FC = ({ className, icon, showProcessingIcon, warning, isActive, ...props }) => { const theme = useTheme(); return ( : icon ? () => ( ) : undefined } {...(props as any)} /> ); };