leadHint.tsx 669 B

123456789101112131415161718192021222324252627282930
  1. import styled from '@emotion/styled';
  2. import {t} from 'sentry/locale';
  3. import {Frame} from 'sentry/types';
  4. type Props = {
  5. leadsToApp: boolean;
  6. isExpanded?: boolean;
  7. nextFrame?: Frame;
  8. };
  9. function LeadHint({leadsToApp, isExpanded, nextFrame}: Props) {
  10. if (isExpanded || !leadsToApp) {
  11. return null;
  12. }
  13. return (
  14. <Wrapper className="leads-to-app-hint" width={!nextFrame ? '115px' : ''}>
  15. {!nextFrame ? t('Crashed in non-app') : t('Called from')}
  16. {': '}
  17. </Wrapper>
  18. );
  19. }
  20. export default LeadHint;
  21. const Wrapper = styled('div')<{width?: string}>`
  22. ${p => p.theme.overflowEllipsis}
  23. max-width: ${p => (p.width ? p.width : '67px')}
  24. `;