reviewAction.tsx 826 B

1234567891011121314151617181920212223242526272829
  1. import ActionLink from 'sentry/components/actions/actionLink';
  2. import type {TooltipProps} from 'sentry/components/tooltip';
  3. import {IconIssues} from 'sentry/icons';
  4. import {t} from 'sentry/locale';
  5. import type {IssueUpdateData} from 'sentry/views/issueList/types';
  6. type Props = {
  7. onUpdate: (data: IssueUpdateData) => void;
  8. disabled?: boolean;
  9. tooltip?: string;
  10. tooltipProps?: Omit<TooltipProps, 'children' | 'title' | 'skipWrapper'>;
  11. };
  12. function ReviewAction({disabled, onUpdate, tooltipProps, tooltip}: Props) {
  13. return (
  14. <ActionLink
  15. type="button"
  16. disabled={disabled}
  17. onAction={() => onUpdate({inbox: false})}
  18. icon={<IconIssues size="xs" />}
  19. title={tooltip}
  20. tooltipProps={tooltipProps}
  21. >
  22. {t('Mark Reviewed')}
  23. </ActionLink>
  24. );
  25. }
  26. export default ReviewAction;