github.com/argoproj/argo-cd/v2@v2.10.9/ui/src/app/shared/components/button.tsx (about)

     1  import * as React from 'react';
     2  import {CSSProperties, MouseEventHandler, ReactNode} from 'react';
     3  import {Icon} from './icon';
     4  import {Tooltip} from 'argo-ui';
     5  
     6  export const Button = ({
     7      onClick,
     8      children,
     9      title,
    10      outline,
    11      icon,
    12      className,
    13      style,
    14      disabled,
    15      beat,
    16      rotate
    17  }: {
    18      onClick?: MouseEventHandler;
    19      children?: ReactNode;
    20      title?: string;
    21      outline?: boolean;
    22      icon?: Icon;
    23      className?: string;
    24      style?: CSSProperties;
    25      disabled?: boolean;
    26      beat?: boolean;
    27      rotate?: boolean;
    28  }) => (
    29      <Tooltip content={title}>
    30          <button
    31              className={'argo-button ' + (!outline ? 'argo-button--base' : 'argo-button--base-o') + ' ' + (disabled ? 'disabled' : '') + ' ' + (className || '')}
    32              style={style}
    33              onClick={onClick}>
    34              {icon && <i className={'fa fa-' + icon + ' ' + (beat ? 'fa-beat' : '') + (rotate ? 'fa-rotate-180' : '')} />} {children}
    35          </button>
    36      </Tooltip>
    37  );