addButton.tsx 375 B

1234567891011121314151617
  1. import type {MouseEventHandler} from 'react';
  2. import {Button} from 'sentry/components/button';
  3. import {IconAdd} from 'sentry/icons';
  4. interface Props {
  5. onAdd: MouseEventHandler<Element>;
  6. title: string;
  7. }
  8. export function AddButton({title, onAdd}: Props) {
  9. return (
  10. <Button size="sm" onClick={onAdd} icon={<IconAdd isCircled />}>
  11. {title}
  12. </Button>
  13. );
  14. }