settingsProjectItem.tsx 827 B

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