reviewAction.tsx 784 B

12345678910111213141516171819202122232425262728293031
  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. type Props = {
  6. onUpdate: (data: {inbox: boolean}) => void;
  7. disabled?: boolean;
  8. tooltip?: string;
  9. tooltipProps?: Omit<
  10. React.ComponentProps<typeof Tooltip>,
  11. 'children' | 'title' | 'skipWrapper'
  12. >;
  13. };
  14. function ReviewAction({disabled, onUpdate, tooltipProps, tooltip}: Props) {
  15. return (
  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. );
  27. }
  28. export default ReviewAction;