assembly.tsx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import styled from '@emotion/styled';
  2. import TextCopyInput from 'sentry/components/textCopyInput';
  3. import {Tooltip} from 'sentry/components/tooltip';
  4. import {t} from 'sentry/locale';
  5. import {space} from 'sentry/styles/space';
  6. type Props = {
  7. culture?: string;
  8. filePath?: string | null;
  9. name?: string;
  10. publicKeyToken?: string;
  11. version?: string;
  12. };
  13. function Assembly({name, version, culture, publicKeyToken, filePath}: Props) {
  14. return (
  15. <AssemblyWrapper>
  16. <AssemblyInfo>
  17. <Caption>Assembly:</Caption>
  18. {name || '-'}
  19. </AssemblyInfo>
  20. <AssemblyInfo>
  21. <Caption>{t('Version')}:</Caption>
  22. {version || '-'}
  23. </AssemblyInfo>
  24. <AssemblyInfo>
  25. <Caption>{t('Culture')}:</Caption>
  26. {culture || '-'}
  27. </AssemblyInfo>
  28. <AssemblyInfo>
  29. <Caption>PublicKeyToken:</Caption>
  30. {publicKeyToken || '-'}
  31. </AssemblyInfo>
  32. {filePath && (
  33. <AssemblyInfo>
  34. <Caption>{t('Path')}:</Caption>
  35. <Tooltip title={filePath}>
  36. <TextCopyInput rtl size="xs">
  37. {filePath}
  38. </TextCopyInput>
  39. </Tooltip>
  40. </AssemblyInfo>
  41. )}
  42. </AssemblyWrapper>
  43. );
  44. }
  45. const AssemblyWrapper = styled('div')`
  46. font-size: 80%;
  47. display: flex;
  48. flex-wrap: wrap;
  49. color: ${p => p.theme.textColor};
  50. text-align: center;
  51. position: relative;
  52. padding: ${space(0.25)} ${space(3)};
  53. `;
  54. const AssemblyInfo = styled('div')`
  55. display: flex;
  56. align-items: center;
  57. margin-right: ${space(2)};
  58. `;
  59. const Caption = styled('span')`
  60. margin-right: 5px;
  61. font-weight: bold;
  62. `;
  63. export {Assembly};