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

alkem-io / client-web / #9611

12 Dec 2024 01:52PM UTC coverage: 5.941%. First build
#9611

Pull #7295

travis-ci

Pull Request #7295: WIP: VC Store feature branch

194 of 10670 branches covered (1.82%)

Branch coverage included in aggregate %.

0 of 7 new or added lines in 5 files covered. (0.0%)

1537 of 18467 relevant lines covered (8.32%)

0.19 hits per line

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

0.0
/src/domain/shared/components/DashboardSections/DashboardAddButton.tsx
1
import TranslationKey from '@/core/i18n/utils/TranslationKey';
2
import Avatar from '@/core/ui/avatar/Avatar';
3
import RouterLink from '@/core/ui/link/RouterLink';
4
import BadgeCardView from '@/core/ui/list/BadgeCardView';
5
import { CaptionSmall } from '@/core/ui/typography';
6
import { AddCircleOutlineOutlined } from '@mui/icons-material';
7
import { ButtonBase, SxProps, Theme } from '@mui/material';
8
import { MouseEventHandler } from 'react';
9
import { useTranslation } from 'react-i18next';
10
import { getIndentStyle } from '../../../space/components/spaceDashboardNavigation/dashboardNavigation/utils';
11

12
interface DashboardAddButtonProps {
13
  url?: string;
14
  onClick?: MouseEventHandler;
15
  level?: number;
16
  compact?: boolean;
17
  translationKey?: TranslationKey;
18
  sx?: SxProps<Theme>;
19
}
20

NEW
21
export const DashboardAddButton = ({ url, level = 0, onClick, translationKey, sx }: DashboardAddButtonProps) => {
×
22
  const { t } = useTranslation();
×
23

24
  return (
×
25
    <BadgeCardView
26
      component={url ? RouterLink : ButtonBase}
×
27
      to={url ?? ''}
×
28
      onClick={onClick}
29
      visual={
30
        <Avatar size="medium" sx={{ backgroundColor: 'primary.main' }} alt={t('common.add')}>
31
          <AddCircleOutlineOutlined />
32
        </Avatar>
33
      }
34
      square
35
      sx={{ ...getIndentStyle(level), ...sx }}
36
    >
37
      <CaptionSmall>
38
        <>
×
39
          {translationKey
40
            ? t(translationKey, { defaultValue: t('common.add') })
41
            : t('buttons.addSubject', { subject: t('common.subspace') })}
42
        </>
43
      </CaptionSmall>
44
    </BadgeCardView>
45
  );
46
};
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