settingsProjectItem.tsx 889 B

12345678910111213141516171819202122232425262728293031323334
  1. import styled from '@emotion/styled';
  2. import ProjectBadge from 'sentry/components/idBadge/projectBadge';
  3. import BookmarkStar from 'sentry/components/projects/bookmarkStar';
  4. import {space} from 'sentry/styles/space';
  5. import type {Organization} from 'sentry/types/organization';
  6. import type {Project} from 'sentry/types/project';
  7. type Props = {
  8. organization: Organization;
  9. project: Project;
  10. };
  11. function ProjectItem({project, organization}: Props) {
  12. return (
  13. <Wrapper>
  14. <BookmarkStar organization={organization} project={project} />
  15. <ProjectBadge
  16. to={`/settings/${organization.slug}/projects/${project.slug}/`}
  17. avatarSize={18}
  18. project={project}
  19. />
  20. </Wrapper>
  21. );
  22. }
  23. const Wrapper = styled('div')`
  24. display: grid;
  25. grid-template-columns: max-content 1fr;
  26. align-items: center;
  27. gap: ${space(1.5)};
  28. `;
  29. export default ProjectItem;