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

CBIIT / crdc-datahub-ui / 18789341118

24 Oct 2025 06:57PM UTC coverage: 78.178% (+15.5%) from 62.703%
18789341118

push

github

web-flow
Merge pull request #888 from CBIIT/3.4.0

3.4.0 Release

4977 of 5488 branches covered (90.69%)

Branch coverage included in aggregate %.

8210 of 9264 new or added lines in 257 files covered. (88.62%)

6307 existing lines in 120 files now uncovered.

30203 of 39512 relevant lines covered (76.44%)

213.36 hits per line

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

70.45
/src/components/Questionnaire/SectionGroup.tsx
1
import { Box, Grid, Stack, Typography, styled } from "@mui/material";
1✔
2
import React, { FC } from "react";
3

4
const StyledGrid = styled(Grid)({
1✔
5
  marginTop: "46px",
1✔
6
  "&:first-of-type": {
1✔
7
    marginTop: 0,
1✔
8
  },
1✔
9
  "& > .MuiGrid-container": {
1✔
10
    marginTop: "24px",
1✔
11
  },
1✔
12
  "& > .MuiGrid-item + .MuiGrid-container": {
1✔
13
    marginTop: 0,
1✔
14
  },
1✔
15
});
1✔
16

17
const StyledHeader = styled(Grid)({
1✔
18
  marginBottom: "18px",
1✔
19
});
1✔
20

21
export const StyledTitle = styled(Typography)({
1✔
22
  fontFamily: "'Nunito', 'Rubik', sans-serif",
1✔
23
  lineHeight: "19.6px",
1✔
24
  fontWeight: 500,
1✔
25
  color: "#5A7C81",
1✔
26
  fontSize: "17px",
1✔
27
});
1✔
28

29
export const StyledDescription = styled(Typography)({
1✔
30
  fontWeight: 400,
1✔
31
  color: "#2A836D",
1✔
32
  marginTop: "24px",
1✔
33
  fontSize: "16px",
1✔
34
  "& a": {
1✔
35
    color: "inherit",
1✔
36
    fontWeight: "700",
1✔
37
    textDecoration: "underline",
1✔
38
  },
1✔
39
});
1✔
40

41
const StyledEndAdornment = styled(Box)({
1✔
42
  marginLeft: "auto",
1✔
43
});
1✔
44

45
const StyledBeginAdornment = styled(Box)({
1✔
46
  marginRight: "12px",
1✔
47
  marginTop: "auto",
1✔
48
  marginBottom: "auto",
1✔
49
  paddingTop: "25px",
1✔
50
});
1✔
51

52
const StyledAsterisk = styled("span")({
1✔
53
  color: "#C93F08",
1✔
54
  marginLeft: "2px",
1✔
55
});
1✔
56

57
const StyledError = styled("div")({
1✔
58
  color: "#C93F08",
1✔
59
  textTransform: "none",
1✔
60
  fontFamily: "Nunito",
1✔
61
  fontWeight: "400",
1✔
62
  fontSize: "0.75rem",
1✔
63
  lineHeight: "1.66",
1✔
64
  textAlign: "left",
1✔
65
  marginTop: "3px",
1✔
66
  marginRight: "14px",
1✔
67
  marginBottom: "0",
1✔
68
  minHeight: "20px",
1✔
69
});
1✔
70

71
type Props = {
72
  children: React.ReactNode;
73
  title?: string;
74
  description?: React.ReactNode;
75
  endButton?: React.ReactNode;
76
  beginButton?: React.ReactNode;
77
  required?: boolean;
78
  error?: string;
79
};
80

81
/**
82
 * Generic Form Input Section Group
83
 *
84
 * @param {Props} props
85
 * @returns {React.ReactNode}
86
 */
87
const SectionGroup: FC<Props> = ({
1✔
UNCOV
88
  children,
×
UNCOV
89
  title,
×
UNCOV
90
  description,
×
UNCOV
91
  endButton,
×
UNCOV
92
  beginButton,
×
UNCOV
93
  required,
×
UNCOV
94
  error,
×
UNCOV
95
}) => (
×
96
  <StyledGrid container rowSpacing={0} columnSpacing={1.5}>
×
UNCOV
97
    <StyledHeader xs={12} item>
×
UNCOV
98
      <Stack direction="column" alignItems="flex-start">
×
UNCOV
99
        {title && (
×
UNCOV
100
          <StyledTitle variant="h3">
×
UNCOV
101
            {title}
×
UNCOV
102
            {required ? <StyledAsterisk className="asterisk">*</StyledAsterisk> : ""}
×
UNCOV
103
            {error ? <StyledError className="asterisk">{error}</StyledError> : ""}
×
UNCOV
104
          </StyledTitle>
×
105
        )}
UNCOV
106
        <Stack direction="row" alignItems="flex-start" justifyContent="space-between" width="100%">
×
UNCOV
107
          {description && <StyledDescription variant="body1">{description}</StyledDescription>}
×
UNCOV
108
          {beginButton && <StyledBeginAdornment>{beginButton}</StyledBeginAdornment>}
×
UNCOV
109
        </Stack>
×
UNCOV
110
      </Stack>
×
UNCOV
111
    </StyledHeader>
×
UNCOV
112
    {children}
×
UNCOV
113
    {endButton && <StyledEndAdornment>{endButton}</StyledEndAdornment>}
×
UNCOV
114
  </StyledGrid>
×
115
);
116

117
export default SectionGroup;
1✔
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