reviewAction.tsx 978 B

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