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

alkem-io / client-web / #6263

16 Nov 2023 11:59AM UTC coverage: 5.91%. First build
#6263

Pull #5203

travis-ci

Pull Request #5203: IconButton Labels

184 of 8743 branches covered (0.0%)

Branch coverage included in aggregate %.

1 of 43 new or added lines in 37 files covered. (2.33%)

1281 of 16046 relevant lines covered (7.98%)

0.19 hits per line

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

0.0
/src/core/ui/content/PageContentBlockHeaderWithDialogAction.tsx
1
import { PropsWithChildren } from 'react';
2
import { IconButton } from '@mui/material';
3
import { Theme } from '@mui/material/styles';
4
import { ExpandContentIcon } from './ExpandContent';
5
import PageContentBlockHeader, { PageContentBlockHeaderProps } from './PageContentBlockHeader';
6
import { Close } from '@mui/icons-material';
7
import { useTranslation } from 'react-i18next';
8

9
interface PageContentBlockHeaderWithDialogActionProps extends PageContentBlockHeaderProps {
10
  onDialogOpen?: () => void;
11
  onDialogClose?: () => void;
12
  expanded?: boolean;
13
  showExpand?: boolean;
14
  id?: string;
15
  titleId?: string;
×
16
}
17

×
18
const iconSize = (theme: Theme) => theme.spacing(2);
×
19

20
const PageContentBlockHeaderWithDialogAction = ({
21
  expanded = false,
22
  onDialogOpen,
23
  onDialogClose,
NEW
24
  actions,
×
25
  showExpand = true,
NEW
26
  id,
×
27
  titleId,
×
28
  ...headerProps
29
}: PropsWithChildren<PageContentBlockHeaderWithDialogActionProps>) => {
30
  const { t } = useTranslation();
31
  const dialogAction = (
×
32
    <>
33
      {actions}
34

35
      {showExpand && (
×
36
        <IconButton
37
          onClick={expanded ? onDialogClose : onDialogOpen}
38
          sx={{ svg: { width: iconSize, height: iconSize } }}
39
          aria-label={t('buttons.expandWindow')}
40
          id={id}
41
        >
42
          {expanded ? <Close /> : <ExpandContentIcon />}
43
        </IconButton>
44
      )}
45
    </>
46
  );
47

48
  return <PageContentBlockHeader {...headerProps} titleId={titleId} id={id} actions={dialogAction} />;
49
};
50

51
export default PageContentBlockHeaderWithDialogAction;
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

© 2026 Coveralls, Inc