• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alkem-io / client-web / #9048

11 Oct 2024 01:42PM UTC coverage: 5.943%. First build
#9048

Pull #7022

travis-ci

Pull Request #7022: [v0.74.0] Roles API + Unauthenticated Explore page

202 of 10241 branches covered (1.97%)

Branch coverage included in aggregate %.

63 of 431 new or added lines in 60 files covered. (14.62%)

1468 of 17861 relevant lines covered (8.22%)

0.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/domain/InnovationPack/InnovationPackCardHorizontal/InnovationPackCardHorizontal.tsx
1
import { Box, Skeleton, useTheme } from '@mui/material';
2
import { gutters } from '@/core/ui/grid/utils';
3
import RouterLink from '@/core/ui/link/RouterLink';
4
import BadgeCardView from '@/core/ui/list/BadgeCardView';
5
import { BlockTitle } from '@/core/ui/typography';
6
import InnovationPackIcon from '../InnovationPackIcon';
7
import RoundedIcon from '@/core/ui/icon/RoundedIcon';
8
import ActionsMenu from '@/core/ui/card/ActionsMenu';
9
import OneLineMarkdown from '@/core/ui/markdown/OneLineMarkdown';
10
import { RoundedBadgeSize } from '@/core/ui/icon/RoundedBadge';
11

12
export interface InnovationPackCardHorizontalProps {
13
  profile: {
14
    displayName: string;
15
    description?: string;
16
    url: string;
17
  };
18
  templates?: {
19
    calloutTemplatesCount?: number;
20
    spaceTemplatesCount?: number;
21
    communityGuidelinesTemplatesCount?: number;
22
    postTemplatesCount?: number;
23
    whiteboardTemplatesCount?: number;
24
  };
25
  actions?: React.ReactNode;
26
  size?: RoundedBadgeSize;
27
}
28

29
export const InnovationPackCardHorizontalSkeleton = () => {
30
  const theme = useTheme();
31
  return (
32
    <BadgeCardView visual={<Skeleton height={gutters(2)(theme)} width={gutters(2)(theme)} variant="circular" />}>
33
      <Skeleton />
34
      <Skeleton />
35
    </BadgeCardView>
×
36
  );
×
37
};
×
38

39
const InnovationPackCardHorizontal = ({
40
  profile: { displayName, description, url },
41
  actions = undefined,
42
  size = 'medium',
43
}: InnovationPackCardHorizontalProps) => (
44
  <BadgeCardView
45
    visual={
×
46
      <RoundedIcon
47
        size={size}
48
        component={InnovationPackIcon}
×
49
        sx={{
50
          color: theme => theme.palette.neutral.light,
×
51
          background: theme => theme.palette.background.paper,
52
        }}
53
      />
54
    }
55
    component={RouterLink}
56
    to={url ?? ''}
57
    actions={actions ? <ActionsMenu>{actions}</ActionsMenu> : undefined}
58
  >
×
59
    <Box display="flex" flexDirection="row" justifyContent="space-between">
60
      <Box display="flex" flexDirection="column">
×
61
        <BlockTitle>{displayName}</BlockTitle>
×
62
        <OneLineMarkdown>{description ?? ''}</OneLineMarkdown>
×
63
      </Box>
×
64
    </Box>
×
65
  </BadgeCardView>
×
66
);
67

×
68
export default InnovationPackCardHorizontal;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc