reviewAction.tsx 975 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import ActionLink from 'sentry/components/actions/actionLink';
  2. import {Tooltip} from 'sentry/components/tooltip';
  3. import {IconIssues} from 'sentry/icons';
  4. import {t} from 'sentry/locale';
  5. import useOrganization from 'sentry/utils/useOrganization';
  6. type Props = {
  7. onUpdate: (data: {inbox: boolean}) => void;
  8. disabled?: boolean;
  9. tooltip?: string;
  10. tooltipProps?: Omit<
  11. React.ComponentProps<typeof Tooltip>,
  12. 'children' | 'title' | 'skipWrapper'
  13. >;
  14. };
  15. function ReviewAction({disabled, onUpdate, tooltipProps, tooltip}: Props) {
  16. const organization = useOrganization();
  17. if (organization.features.includes('escalating-issues-ui')) {
  18. return null;
  19. }
  20. return (
  21. <ActionLink
  22. type="button"
  23. disabled={disabled}
  24. onAction={() => onUpdate({inbox: false})}
  25. icon={<IconIssues size="xs" />}
  26. title={tooltip}
  27. tooltipProps={tooltipProps}
  28. >
  29. {t('Mark Reviewed')}
  30. </ActionLink>
  31. );
  32. }
  33. export default ReviewAction;