releasePreview.tsx 832 B

123456789101112131415161718192021222324252627282930313233
  1. import styled from '@emotion/styled';
  2. import Version from 'sentry/components/version';
  3. import VersionHoverCard from 'sentry/components/versionHoverCard';
  4. import useOrganization from 'sentry/utils/useOrganization';
  5. type ReleasePreviewProps = {
  6. release: {
  7. version: string;
  8. };
  9. };
  10. export function ReleasePreview({release}: ReleasePreviewProps) {
  11. const organization = useOrganization();
  12. return (
  13. <ReleaseWrapper>
  14. <VersionHoverCard
  15. organization={organization}
  16. projectSlug="sentry"
  17. releaseVersion={release.version}
  18. showUnderline
  19. underlineColor="linkUnderline"
  20. >
  21. <Version version={String(release.version)} truncate />
  22. </VersionHoverCard>
  23. </ReleaseWrapper>
  24. );
  25. }
  26. const ReleaseWrapper = styled('div')`
  27. font-size: ${p => p.theme.fontSizeMedium};
  28. `;