@digigov/react-core 1.0.0-8ae63a77 → 1.0.0-8bbf3ef2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccessibilityMenuHeaderButton/index.d.ts +1 -1
- package/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/Button/index.d.ts +8 -1
- package/Button/index.js +3 -2
- package/Button/index.test.js +17 -9
- package/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/Checkbox/index.d.ts +8 -1
- package/Checkbox/index.js +3 -2
- package/Checkbox/index.test.js +8 -0
- package/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/CloseButton/index.d.ts +7 -1
- package/CloseButton/index.js +4 -3
- package/CloseButton/index.test.js +8 -0
- package/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/CopyToClipboardContainer/index.d.ts +9 -1
- package/CopyToClipboardContainer/index.js +3 -2
- package/CopyToClipboardContainer/index.spec.js +8 -0
- package/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/DateInputContainer/index.d.ts +8 -1
- package/DateInputContainer/index.js +4 -3
- package/DateInputContainer/index.test.js +8 -0
- package/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/ErrorSummary/index.d.ts +8 -1
- package/ErrorSummary/index.js +4 -2
- package/ErrorSummary/index.test.js +8 -0
- package/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/ModalContainer/index.d.ts +8 -1
- package/ModalContainer/index.js +3 -2
- package/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/Nav/index.d.ts +30 -15
- package/Nav/index.js +18 -9
- package/Nav/index.test.js +42 -0
- package/NavListItemAction/index.d.ts +1 -1
- package/NavListItemButton/index.d.ts +1 -1
- package/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/NavMenuContainer/index.test.js +24 -0
- package/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/NotificationBannerContainer/index.d.ts +8 -1
- package/NotificationBannerContainer/index.js +3 -2
- package/NotificationBannerContainer/index.test.js +8 -0
- package/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/RadioContainer/index.d.ts +8 -1
- package/RadioContainer/index.js +5 -4
- package/RadioContainer/index.test.js +8 -0
- package/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/SearchButton/index.d.ts +1 -1
- package/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/SelectContainer/index.d.ts +8 -1
- package/SelectContainer/index.js +4 -3
- package/SelectContainer/index.test.js +9 -1
- package/SingleCharacterInput/index.d.ts +1 -1
- package/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/Tabs/index.d.ts +2 -1
- package/Tabs/index.js +4 -3
- package/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/TextArea/index.d.ts +8 -1
- package/TextArea/index.js +6 -5
- package/TextArea/index.test.js +8 -0
- package/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/TextInput/index.d.ts +8 -1
- package/TextInput/index.js +3 -2
- package/TextInput/index.test.js +91 -83
- package/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/WarningText/index.d.ts +8 -1
- package/WarningText/index.js +3 -2
- package/WarningText/index.test.js +8 -0
- package/es/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/es/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/es/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/es/Button/index.js +3 -2
- package/es/Button/index.test.js +17 -9
- package/es/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/es/Checkbox/index.js +3 -2
- package/es/Checkbox/index.test.js +8 -0
- package/es/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/es/CloseButton/index.js +4 -3
- package/es/CloseButton/index.test.js +8 -0
- package/es/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/es/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/es/CopyToClipboardContainer/index.js +3 -2
- package/es/CopyToClipboardContainer/index.spec.js +8 -0
- package/es/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/es/DateInputContainer/index.js +4 -3
- package/es/DateInputContainer/index.test.js +8 -0
- package/es/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/es/ErrorSummary/index.js +4 -2
- package/es/ErrorSummary/index.test.js +8 -0
- package/es/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/es/ModalContainer/index.js +3 -2
- package/es/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/es/Nav/index.js +17 -9
- package/es/Nav/index.test.js +42 -0
- package/es/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/es/NavMenuContainer/index.test.js +24 -0
- package/es/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/es/NotificationBannerContainer/index.js +3 -2
- package/es/NotificationBannerContainer/index.test.js +8 -0
- package/es/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/es/RadioContainer/index.js +5 -4
- package/es/RadioContainer/index.test.js +8 -0
- package/es/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/es/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/es/SelectContainer/index.js +4 -3
- package/es/SelectContainer/index.test.js +9 -1
- package/es/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/es/Tabs/index.js +4 -3
- package/es/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/es/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/es/TextArea/index.js +6 -5
- package/es/TextArea/index.test.js +8 -0
- package/es/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/es/TextInput/index.js +3 -2
- package/es/TextInput/index.test.js +91 -83
- package/es/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/es/WarningText/index.js +3 -2
- package/es/WarningText/index.test.js +8 -0
- package/esm/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/esm/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/esm/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/esm/Button/index.js +3 -2
- package/esm/Button/index.test.js +17 -9
- package/esm/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/esm/Checkbox/index.js +3 -2
- package/esm/Checkbox/index.test.js +8 -0
- package/esm/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/esm/CloseButton/index.js +4 -3
- package/esm/CloseButton/index.test.js +8 -0
- package/esm/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/esm/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/esm/CopyToClipboardContainer/index.js +3 -2
- package/esm/CopyToClipboardContainer/index.spec.js +8 -0
- package/esm/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/DateInputContainer/index.js +4 -3
- package/esm/DateInputContainer/index.test.js +8 -0
- package/esm/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/esm/ErrorSummary/index.js +4 -2
- package/esm/ErrorSummary/index.test.js +8 -0
- package/esm/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/esm/ModalContainer/index.js +3 -2
- package/esm/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/esm/Nav/index.js +17 -9
- package/esm/Nav/index.test.js +42 -0
- package/esm/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/esm/NavMenuContainer/index.test.js +24 -0
- package/esm/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/esm/NotificationBannerContainer/index.js +3 -2
- package/esm/NotificationBannerContainer/index.test.js +8 -0
- package/esm/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/RadioContainer/index.js +5 -4
- package/esm/RadioContainer/index.test.js +8 -0
- package/esm/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/SelectContainer/index.js +4 -3
- package/esm/SelectContainer/index.test.js +9 -1
- package/esm/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/Tabs/index.js +4 -3
- package/esm/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/esm/TextArea/index.js +6 -5
- package/esm/TextArea/index.test.js +8 -0
- package/esm/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/esm/TextInput/index.js +3 -2
- package/esm/TextInput/index.test.js +91 -83
- package/esm/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/esm/WarningText/index.js +3 -2
- package/esm/WarningText/index.test.js +8 -0
- package/esm/index.js +1 -1
- package/package.json +3 -3
- package/src/BottomInfo/__snapshots__/index.test.tsx.snap +7 -2
- package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +7 -2
- package/src/Button/__snapshots__/index.test.tsx.snap +18 -0
- package/src/Button/index.test.tsx +3 -0
- package/src/Button/index.tsx +9 -0
- package/src/Checkbox/__snapshots__/index.test.tsx.snap +76 -0
- package/src/Checkbox/index.test.tsx +10 -0
- package/src/Checkbox/index.tsx +9 -1
- package/src/CloseButton/__snapshots__/index.test.tsx.snap +53 -0
- package/src/CloseButton/index.test.tsx +3 -0
- package/src/CloseButton/index.tsx +10 -3
- package/src/Container/__snapshots__/index.test.tsx.snap +14 -4
- package/src/CopyToClipboardContainer/__snapshots__/index.spec.tsx.snap +21 -0
- package/src/CopyToClipboardContainer/index.spec.tsx +8 -2
- package/src/CopyToClipboardContainer/index.tsx +10 -1
- package/src/DateInputContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/src/DateInputContainer/index.test.tsx +5 -0
- package/src/DateInputContainer/index.tsx +11 -2
- package/src/ErrorSummary/__snapshots__/index.test.tsx.snap +39 -0
- package/src/ErrorSummary/index.test.tsx +4 -0
- package/src/ErrorSummary/index.tsx +12 -5
- package/src/ImageLogo/__snapshots__/index.test.tsx.snap +5 -3
- package/src/ModalContainer/index.tsx +9 -1
- package/src/Nav/__snapshots__/index.test.tsx.snap +91 -4
- package/src/Nav/index.test.tsx +15 -0
- package/src/Nav/index.tsx +53 -20
- package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +104 -0
- package/src/NavMenuContainer/index.test.tsx +9 -0
- package/src/NotificationBannerContainer/__snapshots__/index.test.tsx.snap +23 -0
- package/src/NotificationBannerContainer/index.test.tsx +7 -0
- package/src/NotificationBannerContainer/index.tsx +9 -1
- package/src/RadioContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/src/RadioContainer/index.test.tsx +3 -0
- package/src/RadioContainer/index.tsx +9 -1
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +2 -2
- package/src/SelectContainer/__snapshots__/index.test.tsx.snap +17 -0
- package/src/SelectContainer/index.test.tsx +5 -0
- package/src/SelectContainer/index.tsx +11 -2
- package/src/StepNav/__snapshots__/index.test.tsx.snap +2 -2
- package/src/Tabs/index.tsx +5 -2
- package/src/TaskList/__snapshots__/index.test.tsx.snap +2 -2
- package/src/TextArea/__snapshots__/index.test.tsx.snap +19 -0
- package/src/TextArea/index.test.tsx +3 -0
- package/src/TextArea/index.tsx +11 -2
- package/src/TextInput/__snapshots__/index.test.tsx.snap +17 -0
- package/src/TextInput/index.test.tsx +3 -0
- package/src/TextInput/index.tsx +9 -0
- package/src/WarningText/__snapshots__/index.test.tsx.snap +31 -0
- package/src/WarningText/index.test.tsx +3 -0
- package/src/WarningText/index.tsx +9 -1
|
@@ -8,13 +8,18 @@ exports[`renders the BottomInfo with no props 1`] = `
|
|
|
8
8
|
<ForwardRef(Grid)
|
|
9
9
|
className="govgr-bottom-info govgr-container"
|
|
10
10
|
container={true}
|
|
11
|
+
spacing={
|
|
12
|
+
Object {
|
|
13
|
+
"sm": 12,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
11
16
|
>
|
|
12
17
|
<ForwardRef(Base)
|
|
13
18
|
as="div"
|
|
14
|
-
className="govgr-bottom-info govgr-container govgr-grid"
|
|
19
|
+
className="govgr-bottom-info govgr-container govgr-gap-sm-12 govgr-grid"
|
|
15
20
|
>
|
|
16
21
|
<div
|
|
17
|
-
className="govgr-bottom-info govgr-container govgr-grid"
|
|
22
|
+
className="govgr-bottom-info govgr-container govgr-gap-sm-12 govgr-grid"
|
|
18
23
|
>
|
|
19
24
|
hello
|
|
20
25
|
</div>
|
|
@@ -8,13 +8,18 @@ exports[`renders the BottomInfoContainer with no props 1`] = `
|
|
|
8
8
|
<ForwardRef(Grid)
|
|
9
9
|
className="govgr-bottom-info__container govgr-container"
|
|
10
10
|
container={true}
|
|
11
|
+
spacing={
|
|
12
|
+
Object {
|
|
13
|
+
"sm": 12,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
11
16
|
>
|
|
12
17
|
<ForwardRef(Base)
|
|
13
18
|
as="div"
|
|
14
|
-
className="govgr-bottom-info__container govgr-container govgr-grid"
|
|
19
|
+
className="govgr-bottom-info__container govgr-container govgr-gap-sm-12 govgr-grid"
|
|
15
20
|
>
|
|
16
21
|
<div
|
|
17
|
-
className="govgr-bottom-info__container govgr-container govgr-grid"
|
|
22
|
+
className="govgr-bottom-info__container govgr-container govgr-gap-sm-12 govgr-grid"
|
|
18
23
|
>
|
|
19
24
|
hello
|
|
20
25
|
</div>
|
|
@@ -137,6 +137,24 @@ exports[`renders the Button with color=warning with disabled=true 1`] = `
|
|
|
137
137
|
</ForwardRef(Button)>
|
|
138
138
|
`;
|
|
139
139
|
|
|
140
|
+
exports[`renders the Button with dense=true 1`] = `
|
|
141
|
+
<ForwardRef(Button)
|
|
142
|
+
dense={true}
|
|
143
|
+
>
|
|
144
|
+
<ForwardRef(Base)
|
|
145
|
+
as="button"
|
|
146
|
+
className="govgr-btn-primary govgr-btn govgr-btn--dense"
|
|
147
|
+
printHidden={true}
|
|
148
|
+
>
|
|
149
|
+
<button
|
|
150
|
+
className="govgr-btn-primary govgr-btn govgr-btn--dense govgr-print-hidden"
|
|
151
|
+
>
|
|
152
|
+
hello
|
|
153
|
+
</button>
|
|
154
|
+
</ForwardRef(Base)>
|
|
155
|
+
</ForwardRef(Button)>
|
|
156
|
+
`;
|
|
157
|
+
|
|
140
158
|
exports[`renders the Button with disabled=false 1`] = `
|
|
141
159
|
<ForwardRef(Button)
|
|
142
160
|
disabled={false}
|
|
@@ -21,6 +21,9 @@ it('renders the Button with disabled=true', () => {
|
|
|
21
21
|
it('renders the Button with disabled=false', () => {
|
|
22
22
|
expect(mount(<Button disabled={false}>hello</Button>)).toMatchSnapshot();
|
|
23
23
|
});
|
|
24
|
+
it('renders the Button with dense=true', () => {
|
|
25
|
+
expect(mount(<Button dense={true}>hello</Button>)).toMatchSnapshot();
|
|
26
|
+
});
|
|
24
27
|
it('renders the Button with color=primary with disabled=true', () => {
|
|
25
28
|
expect(
|
|
26
29
|
mount(
|
package/src/Button/index.tsx
CHANGED
|
@@ -22,6 +22,13 @@ export interface ButtonProps extends BaseProps<'button'> {
|
|
|
22
22
|
* @default 'button'
|
|
23
23
|
*/
|
|
24
24
|
variant?: 'link' | 'button';
|
|
25
|
+
/**
|
|
26
|
+
* dense is optional.
|
|
27
|
+
* @value true Button will be dense.
|
|
28
|
+
* @value false
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
dense?: boolean;
|
|
25
32
|
}
|
|
26
33
|
/**
|
|
27
34
|
* Use the Button component to help users carry out an action.
|
|
@@ -31,6 +38,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
31
38
|
{
|
|
32
39
|
color = 'primary',
|
|
33
40
|
variant = 'button',
|
|
41
|
+
dense,
|
|
34
42
|
disabled,
|
|
35
43
|
printHidden = true,
|
|
36
44
|
className,
|
|
@@ -48,6 +56,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
48
56
|
className={clsx(className, {
|
|
49
57
|
'govgr-link': variant === 'link',
|
|
50
58
|
'govgr-btn': variant === 'button',
|
|
59
|
+
'govgr-btn--dense': dense,
|
|
51
60
|
'govgr-btn-primary': variant === 'button' && color === 'primary',
|
|
52
61
|
'govgr-btn-secondary': variant === 'button' && color === 'secondary',
|
|
53
62
|
'govgr-btn-warning': variant === 'button' && color === 'warning',
|
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the Checkbox with dense prop and CheckboxItems 1`] = `
|
|
4
|
+
<ForwardRef(Checkbox)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
as="div"
|
|
9
|
+
className="govgr-checkboxes--dense govgr-checkboxes"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
className="govgr-checkboxes--dense govgr-checkboxes"
|
|
13
|
+
>
|
|
14
|
+
<ForwardRef(CheckboxItem)>
|
|
15
|
+
<div
|
|
16
|
+
className="govgr-checkboxes__item"
|
|
17
|
+
>
|
|
18
|
+
<ForwardRef(LabelContainer)
|
|
19
|
+
className="govgr-checkboxes__label"
|
|
20
|
+
>
|
|
21
|
+
<ForwardRef(Base)
|
|
22
|
+
as="label"
|
|
23
|
+
className="govgr-checkboxes__label govgr-label"
|
|
24
|
+
>
|
|
25
|
+
<label
|
|
26
|
+
className="govgr-checkboxes__label govgr-label"
|
|
27
|
+
>
|
|
28
|
+
This is item 1
|
|
29
|
+
<ForwardRef(Base)
|
|
30
|
+
as="input"
|
|
31
|
+
className="govgr-checkboxes__input"
|
|
32
|
+
type="checkbox"
|
|
33
|
+
>
|
|
34
|
+
<input
|
|
35
|
+
className="govgr-checkboxes__input"
|
|
36
|
+
type="checkbox"
|
|
37
|
+
/>
|
|
38
|
+
</ForwardRef(Base)>
|
|
39
|
+
</label>
|
|
40
|
+
</ForwardRef(Base)>
|
|
41
|
+
</ForwardRef(LabelContainer)>
|
|
42
|
+
</div>
|
|
43
|
+
</ForwardRef(CheckboxItem)>
|
|
44
|
+
<ForwardRef(CheckboxItem)>
|
|
45
|
+
<div
|
|
46
|
+
className="govgr-checkboxes__item"
|
|
47
|
+
>
|
|
48
|
+
<ForwardRef(LabelContainer)
|
|
49
|
+
className="govgr-checkboxes__label"
|
|
50
|
+
>
|
|
51
|
+
<ForwardRef(Base)
|
|
52
|
+
as="label"
|
|
53
|
+
className="govgr-checkboxes__label govgr-label"
|
|
54
|
+
>
|
|
55
|
+
<label
|
|
56
|
+
className="govgr-checkboxes__label govgr-label"
|
|
57
|
+
>
|
|
58
|
+
This is item 2
|
|
59
|
+
<ForwardRef(Base)
|
|
60
|
+
as="input"
|
|
61
|
+
className="govgr-checkboxes__input"
|
|
62
|
+
type="checkbox"
|
|
63
|
+
>
|
|
64
|
+
<input
|
|
65
|
+
className="govgr-checkboxes__input"
|
|
66
|
+
type="checkbox"
|
|
67
|
+
/>
|
|
68
|
+
</ForwardRef(Base)>
|
|
69
|
+
</label>
|
|
70
|
+
</ForwardRef(Base)>
|
|
71
|
+
</ForwardRef(LabelContainer)>
|
|
72
|
+
</div>
|
|
73
|
+
</ForwardRef(CheckboxItem)>
|
|
74
|
+
</div>
|
|
75
|
+
</ForwardRef(Base)>
|
|
76
|
+
</ForwardRef(Checkbox)>
|
|
77
|
+
`;
|
|
78
|
+
|
|
3
79
|
exports[`renders the Checkbox with layout=horizontal and CheckboxItems 1`] = `
|
|
4
80
|
<ForwardRef(Checkbox)
|
|
5
81
|
layout="horizontal"
|
|
@@ -27,3 +27,13 @@ it('renders the Checkbox with layout=horizontal and CheckboxItems', () => {
|
|
|
27
27
|
)
|
|
28
28
|
).toMatchSnapshot();
|
|
29
29
|
});
|
|
30
|
+
it('renders the Checkbox with dense prop and CheckboxItems', () => {
|
|
31
|
+
expect(
|
|
32
|
+
mount(
|
|
33
|
+
<Checkbox dense>
|
|
34
|
+
<CheckboxItem>This is item 1</CheckboxItem>
|
|
35
|
+
<CheckboxItem>This is item 2</CheckboxItem>
|
|
36
|
+
</Checkbox>
|
|
37
|
+
)
|
|
38
|
+
).toMatchSnapshot();
|
|
39
|
+
});
|
package/src/Checkbox/index.tsx
CHANGED
|
@@ -12,6 +12,13 @@ export interface CheckboxProps extends BaseProps<'div'> {
|
|
|
12
12
|
* @default 'vertical'
|
|
13
13
|
*/
|
|
14
14
|
layout?: 'horizontal' | 'vertical';
|
|
15
|
+
/**
|
|
16
|
+
* dense is optional.
|
|
17
|
+
* @value true Checkboxes will be dense.
|
|
18
|
+
* @value false
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
dense?: boolean;
|
|
15
22
|
}
|
|
16
23
|
/**
|
|
17
24
|
* Details for the Checkbox.
|
|
@@ -19,7 +26,7 @@ export interface CheckboxProps extends BaseProps<'div'> {
|
|
|
19
26
|
* It takes CheckboxItem as children
|
|
20
27
|
*/
|
|
21
28
|
export const Checkbox = React.forwardRef<HTMLDivElement, CheckboxProps>(
|
|
22
|
-
function Checkbox({ layout, className, children, ...props }, ref) {
|
|
29
|
+
function Checkbox({ layout, dense, className, children, ...props }, ref) {
|
|
23
30
|
return (
|
|
24
31
|
<Base
|
|
25
32
|
as="div"
|
|
@@ -27,6 +34,7 @@ export const Checkbox = React.forwardRef<HTMLDivElement, CheckboxProps>(
|
|
|
27
34
|
className={clsx(className, {
|
|
28
35
|
'govgr-checkboxes': true,
|
|
29
36
|
'govgr-checkboxes--horizontal': layout=== 'horizontal',
|
|
37
|
+
'govgr-checkboxes--dense': dense,
|
|
30
38
|
})}
|
|
31
39
|
{...props}
|
|
32
40
|
>
|
|
@@ -49,3 +49,56 @@ exports[`renders the CloseButton 1`] = `
|
|
|
49
49
|
</ForwardRef(Button)>
|
|
50
50
|
</ForwardRef(CloseButton)>
|
|
51
51
|
`;
|
|
52
|
+
|
|
53
|
+
exports[`renders the CloseButton with label prop 1`] = `
|
|
54
|
+
<ForwardRef(CloseButton)
|
|
55
|
+
label="Κλείσιμο"
|
|
56
|
+
>
|
|
57
|
+
<ForwardRef(Button)
|
|
58
|
+
className="govgr-close-btn"
|
|
59
|
+
variant="link"
|
|
60
|
+
>
|
|
61
|
+
<ForwardRef(Base)
|
|
62
|
+
as="button"
|
|
63
|
+
className="govgr-close-btn govgr-link"
|
|
64
|
+
printHidden={true}
|
|
65
|
+
>
|
|
66
|
+
<button
|
|
67
|
+
className="govgr-close-btn govgr-link govgr-print-hidden"
|
|
68
|
+
>
|
|
69
|
+
Κλείσιμο
|
|
70
|
+
<CloseIcon>
|
|
71
|
+
<ForwardRef(Icon)
|
|
72
|
+
icon="close"
|
|
73
|
+
>
|
|
74
|
+
<ForwardRef(SvgIcon)
|
|
75
|
+
className="govgr-svg-icon--close"
|
|
76
|
+
>
|
|
77
|
+
<ForwardRef(Base)
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
as="svg"
|
|
80
|
+
className="govgr-svg-icon--close govgr-svg-icon"
|
|
81
|
+
focusable="false"
|
|
82
|
+
viewBox="0 0 24 24"
|
|
83
|
+
>
|
|
84
|
+
<svg
|
|
85
|
+
aria-hidden="true"
|
|
86
|
+
className="govgr-svg-icon--close govgr-svg-icon"
|
|
87
|
+
focusable="false"
|
|
88
|
+
viewBox="0 0 24 24"
|
|
89
|
+
>
|
|
90
|
+
<close>
|
|
91
|
+
<polygon
|
|
92
|
+
points="14.4,11.8 22,4.2 19.7,1.8 12,9.4 4.4,1.8 2,4.2 9.7,11.9 2.1,19.5 4.4,21.9 12.1,14.3 19.7,21.9 22.1,19.5 "
|
|
93
|
+
/>
|
|
94
|
+
</close>
|
|
95
|
+
</svg>
|
|
96
|
+
</ForwardRef(Base)>
|
|
97
|
+
</ForwardRef(SvgIcon)>
|
|
98
|
+
</ForwardRef(Icon)>
|
|
99
|
+
</CloseIcon>
|
|
100
|
+
</button>
|
|
101
|
+
</ForwardRef(Base)>
|
|
102
|
+
</ForwardRef(Button)>
|
|
103
|
+
</ForwardRef(CloseButton)>
|
|
104
|
+
`;
|
|
@@ -6,3 +6,6 @@ import CloseButton from '@digigov/react-core/CloseButton';
|
|
|
6
6
|
it('renders the CloseButton', () => {
|
|
7
7
|
expect(mount(<CloseButton />)).toMatchSnapshot();
|
|
8
8
|
});
|
|
9
|
+
it('renders the CloseButton with label prop', () => {
|
|
10
|
+
expect(mount(<CloseButton label="Κλείσιμο"/>)).toMatchSnapshot();
|
|
11
|
+
});
|
|
@@ -3,14 +3,21 @@ import clsx from 'clsx';
|
|
|
3
3
|
import Button, { ButtonProps } from '@digigov/react-core/Button';
|
|
4
4
|
import { CloseIcon } from '@digigov/react-icons/CloseIcon';
|
|
5
5
|
|
|
6
|
-
export interface CloseButtonProps extends ButtonProps {
|
|
6
|
+
export interface CloseButtonProps extends ButtonProps {
|
|
7
|
+
/**
|
|
8
|
+
* label is optional.
|
|
9
|
+
* If empty, the CloseButton will only have a close icon.
|
|
10
|
+
* Use this prop to add text beside the close icon. For example: 'Κλείσιμο'.
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
7
14
|
/**
|
|
8
15
|
* CloseButton is an <button> element. It can be used be inside the FilterSection component.
|
|
9
16
|
*/
|
|
10
17
|
export const CloseButton = React.forwardRef<
|
|
11
18
|
HTMLButtonElement,
|
|
12
19
|
CloseButtonProps
|
|
13
|
-
>(function CloseButton({ className, children, ...props }, ref) {
|
|
20
|
+
>(function CloseButton({ label, className, children, ...props }, ref) {
|
|
14
21
|
return (
|
|
15
22
|
<Button
|
|
16
23
|
variant="link"
|
|
@@ -20,7 +27,7 @@ export const CloseButton = React.forwardRef<
|
|
|
20
27
|
ref={ref}
|
|
21
28
|
{...props}
|
|
22
29
|
>
|
|
23
|
-
{children}
|
|
30
|
+
{label || children}
|
|
24
31
|
<CloseIcon />
|
|
25
32
|
</Button>
|
|
26
33
|
);
|
|
@@ -30,13 +30,18 @@ exports[`renders the Container with fullWidth prop 1`] = `
|
|
|
30
30
|
<ForwardRef(Grid)
|
|
31
31
|
className="govgr-container--full-width govgr-container"
|
|
32
32
|
container={true}
|
|
33
|
+
spacing={
|
|
34
|
+
Object {
|
|
35
|
+
"sm": 12,
|
|
36
|
+
}
|
|
37
|
+
}
|
|
33
38
|
>
|
|
34
39
|
<ForwardRef(Base)
|
|
35
40
|
as="div"
|
|
36
|
-
className="govgr-container--full-width govgr-container govgr-grid"
|
|
41
|
+
className="govgr-container--full-width govgr-container govgr-gap-sm-12 govgr-grid"
|
|
37
42
|
>
|
|
38
43
|
<div
|
|
39
|
-
className="govgr-container--full-width govgr-container govgr-grid"
|
|
44
|
+
className="govgr-container--full-width govgr-container govgr-gap-sm-12 govgr-grid"
|
|
40
45
|
>
|
|
41
46
|
hello
|
|
42
47
|
</div>
|
|
@@ -50,13 +55,18 @@ exports[`renders the Container with no props 1`] = `
|
|
|
50
55
|
<ForwardRef(Grid)
|
|
51
56
|
className="govgr-container"
|
|
52
57
|
container={true}
|
|
58
|
+
spacing={
|
|
59
|
+
Object {
|
|
60
|
+
"sm": 12,
|
|
61
|
+
}
|
|
62
|
+
}
|
|
53
63
|
>
|
|
54
64
|
<ForwardRef(Base)
|
|
55
65
|
as="div"
|
|
56
|
-
className="govgr-container govgr-grid"
|
|
66
|
+
className="govgr-container govgr-gap-sm-12 govgr-grid"
|
|
57
67
|
>
|
|
58
68
|
<div
|
|
59
|
-
className="govgr-container govgr-grid"
|
|
69
|
+
className="govgr-container govgr-gap-sm-12 govgr-grid"
|
|
60
70
|
>
|
|
61
71
|
hello
|
|
62
72
|
</div>
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the CopyToClipboardContainer with dense=true 1`] = `
|
|
4
|
+
<ForwardRef(CopyToClipboardContainer)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
as="div"
|
|
9
|
+
className="govgr-copy-to-clipboard"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
className="govgr-copy-to-clipboard"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
className="govgr-copy-to-clipboard__tooltip--right govgr-copy-to-clipboard__tooltip--dense govgr-copy-to-clipboard__tooltip"
|
|
16
|
+
>
|
|
17
|
+
Text copied!
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</ForwardRef(Base)>
|
|
21
|
+
</ForwardRef(CopyToClipboardContainer)>
|
|
22
|
+
`;
|
|
23
|
+
|
|
3
24
|
exports[`renders the CopyToClipboardContainer with no props 1`] = `
|
|
4
25
|
<ForwardRef(CopyToClipboardContainer)>
|
|
5
26
|
<ForwardRef(Base)
|
|
@@ -11,8 +11,7 @@ it('renders the CopyToClipboardContainer with no props', () => {
|
|
|
11
11
|
it('renders the CopyToClipboardContainer with variant=tooltip', () => {
|
|
12
12
|
expect(
|
|
13
13
|
mount(
|
|
14
|
-
<CopyToClipboardContainer variant="tooltip"
|
|
15
|
-
tooltipAlign="right">
|
|
14
|
+
<CopyToClipboardContainer variant="tooltip" tooltipAlign="right">
|
|
16
15
|
Text copied!
|
|
17
16
|
</CopyToClipboardContainer>
|
|
18
17
|
)
|
|
@@ -27,3 +26,10 @@ it('renders the CopyToClipboardContainer with variant=banner', () => {
|
|
|
27
26
|
)
|
|
28
27
|
).toMatchSnapshot();
|
|
29
28
|
});
|
|
29
|
+
it('renders the CopyToClipboardContainer with dense=true', () => {
|
|
30
|
+
expect(
|
|
31
|
+
mount(
|
|
32
|
+
<CopyToClipboardContainer dense>Text copied!</CopyToClipboardContainer>
|
|
33
|
+
)
|
|
34
|
+
).toMatchSnapshot();
|
|
35
|
+
});
|
|
@@ -17,6 +17,14 @@ export interface CopyToClipboardContainerProps extends BaseProps<'div'> {
|
|
|
17
17
|
* @default 'right'
|
|
18
18
|
*/
|
|
19
19
|
tooltipAlign?: 'right' | 'left';
|
|
20
|
+
/**
|
|
21
|
+
* dense is optional.
|
|
22
|
+
* affects only the density of the tooltip.
|
|
23
|
+
* @value true tooltip will be dense.
|
|
24
|
+
* @value false
|
|
25
|
+
* @default false
|
|
26
|
+
* */
|
|
27
|
+
dense?: boolean;
|
|
20
28
|
}
|
|
21
29
|
/**
|
|
22
30
|
* CopyToClipboardContainer is a wrapper component for CopyToClipboardMessage
|
|
@@ -25,7 +33,7 @@ export const CopyToClipboardContainer = React.forwardRef<
|
|
|
25
33
|
HTMLDivElement,
|
|
26
34
|
CopyToClipboardContainerProps
|
|
27
35
|
>(function CopyToClipboardContainer(
|
|
28
|
-
{ variant = 'tooltip', tooltipAlign = 'right', className, children, ...props },
|
|
36
|
+
{ variant = 'tooltip', tooltipAlign = 'right', className, dense, children, ...props },
|
|
29
37
|
ref
|
|
30
38
|
) {
|
|
31
39
|
return (
|
|
@@ -41,6 +49,7 @@ export const CopyToClipboardContainer = React.forwardRef<
|
|
|
41
49
|
<div
|
|
42
50
|
className={clsx(className, {
|
|
43
51
|
'govgr-copy-to-clipboard__tooltip': variant === 'tooltip',
|
|
52
|
+
'govgr-copy-to-clipboard__tooltip--dense': variant === 'tooltip' && dense,
|
|
44
53
|
'govgr-copy-to-clipboard__tooltip--left': variant === 'tooltip' && tooltipAlign === 'left',
|
|
45
54
|
'govgr-copy-to-clipboard__tooltip--right': variant === 'tooltip' && tooltipAlign === 'right',
|
|
46
55
|
'govgr-copy-to-clipboard__banner': variant === 'banner',
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the DateInputContainer with dense prop 1`] = `
|
|
4
|
+
<ForwardRef(DateInputContainer)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
as="div"
|
|
9
|
+
className="govgr-date-input--dense govgr-date-input"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
className="govgr-date-input--dense govgr-date-input"
|
|
13
|
+
>
|
|
14
|
+
hello
|
|
15
|
+
</div>
|
|
16
|
+
</ForwardRef(Base)>
|
|
17
|
+
</ForwardRef(DateInputContainer)>
|
|
18
|
+
`;
|
|
19
|
+
|
|
3
20
|
exports[`renders the DateInputContainer with no props 1`] = `
|
|
4
21
|
<ForwardRef(DateInputContainer)>
|
|
5
22
|
<ForwardRef(Base)
|
|
@@ -8,3 +8,8 @@ it('renders the DateInputContainer with no props', () => {
|
|
|
8
8
|
mount(<DateInputContainer>hello</DateInputContainer>)
|
|
9
9
|
).toMatchSnapshot();
|
|
10
10
|
});
|
|
11
|
+
it('renders the DateInputContainer with dense prop', () => {
|
|
12
|
+
expect(
|
|
13
|
+
mount(<DateInputContainer dense>hello</DateInputContainer>)
|
|
14
|
+
).toMatchSnapshot();
|
|
15
|
+
});
|
|
@@ -2,7 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface DateInputContainerProps extends BaseProps<'div'> {
|
|
5
|
+
export interface DateInputContainerProps extends BaseProps<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* dense is optional.
|
|
8
|
+
* @value true DateInputs will be dense.
|
|
9
|
+
* @value false
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
dense?: boolean;
|
|
13
|
+
}
|
|
6
14
|
/**
|
|
7
15
|
* Details for the DateInputContainer.
|
|
8
16
|
* DateInputContainer component is used for helping users enter a memorable date or one they can easily look up
|
|
@@ -12,13 +20,14 @@ export interface DateInputContainerProps extends BaseProps<'div'> {}
|
|
|
12
20
|
export const DateInputContainer = React.forwardRef<
|
|
13
21
|
HTMLDivElement,
|
|
14
22
|
DateInputContainerProps
|
|
15
|
-
>(function DateInputContainer({ className, children, ...props }, ref) {
|
|
23
|
+
>(function DateInputContainer({ dense, className, children, ...props }, ref) {
|
|
16
24
|
return (
|
|
17
25
|
<Base
|
|
18
26
|
as="div"
|
|
19
27
|
ref={ref}
|
|
20
28
|
className={clsx(className, {
|
|
21
29
|
'govgr-date-input': true,
|
|
30
|
+
'govgr-date-input--dense': dense,
|
|
22
31
|
})}
|
|
23
32
|
{...props}
|
|
24
33
|
>
|
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the ErrorSummary with dense=true 1`] = `
|
|
4
|
+
<ForwardRef(ErrorSummary)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(NotificationBannerContainer)
|
|
8
|
+
dense={true}
|
|
9
|
+
variant="error"
|
|
10
|
+
>
|
|
11
|
+
<ForwardRef(Base)
|
|
12
|
+
aria-labelledby="govgr-notification-banner-title"
|
|
13
|
+
as="div"
|
|
14
|
+
className="govgr-notification-banner--error govgr-notification-banner--dense govgr-notification-banner"
|
|
15
|
+
data-module="govgr-notification-banner"
|
|
16
|
+
role="region"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
aria-labelledby="govgr-notification-banner-title"
|
|
20
|
+
className="govgr-notification-banner--error govgr-notification-banner--dense govgr-notification-banner"
|
|
21
|
+
data-module="govgr-notification-banner"
|
|
22
|
+
role="region"
|
|
23
|
+
>
|
|
24
|
+
<ForwardRef(NotificationBannerContent)>
|
|
25
|
+
<ForwardRef(Base)
|
|
26
|
+
as="div"
|
|
27
|
+
className="govgr-notification-banner__content"
|
|
28
|
+
>
|
|
29
|
+
<div
|
|
30
|
+
className="govgr-notification-banner__content"
|
|
31
|
+
>
|
|
32
|
+
hello
|
|
33
|
+
</div>
|
|
34
|
+
</ForwardRef(Base)>
|
|
35
|
+
</ForwardRef(NotificationBannerContent)>
|
|
36
|
+
</div>
|
|
37
|
+
</ForwardRef(Base)>
|
|
38
|
+
</ForwardRef(NotificationBannerContainer)>
|
|
39
|
+
</ForwardRef(ErrorSummary)>
|
|
40
|
+
`;
|
|
41
|
+
|
|
3
42
|
exports[`renders the ErrorSummary with no props 1`] = `
|
|
4
43
|
<ForwardRef(ErrorSummary)>
|
|
5
44
|
<ForwardRef(NotificationBannerContainer)
|
|
@@ -6,3 +6,7 @@ import ErrorSummary from '@digigov/react-core/ErrorSummary';
|
|
|
6
6
|
it('renders the ErrorSummary with no props', () => {
|
|
7
7
|
expect(mount(<ErrorSummary>hello</ErrorSummary>)).toMatchSnapshot();
|
|
8
8
|
});
|
|
9
|
+
|
|
10
|
+
it('renders the ErrorSummary with dense=true', () => {
|
|
11
|
+
expect(mount(<ErrorSummary dense>hello</ErrorSummary>)).toMatchSnapshot();
|
|
12
|
+
});
|
|
@@ -3,22 +3,29 @@ import { BaseProps } from '@digigov/react-core/Base';
|
|
|
3
3
|
import NotificationBannerContainer from '@digigov/react-core/NotificationBannerContainer';
|
|
4
4
|
import NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';
|
|
5
5
|
|
|
6
|
-
export interface ErrorSummaryProps extends BaseProps<'div'> {
|
|
6
|
+
export interface ErrorSummaryProps extends BaseProps<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* dense is optional.
|
|
9
|
+
* @value true ErrorSummary will be dense.
|
|
10
|
+
* @value false
|
|
11
|
+
* @default false
|
|
12
|
+
* */
|
|
13
|
+
dense?: boolean;
|
|
14
|
+
}
|
|
7
15
|
/**
|
|
8
16
|
* Use this component at the top of a page to summarize any errors a user has made.
|
|
9
17
|
*/
|
|
10
18
|
export const ErrorSummary = React.forwardRef<HTMLDivElement, ErrorSummaryProps>(
|
|
11
|
-
function ErrorSummary({ className, children, ...props }, ref) {
|
|
19
|
+
function ErrorSummary({ className, dense, children, ...props }, ref) {
|
|
12
20
|
return (
|
|
13
21
|
<NotificationBannerContainer
|
|
14
22
|
variant={'error'}
|
|
15
23
|
className={className}
|
|
16
24
|
ref={ref}
|
|
25
|
+
dense={dense}
|
|
17
26
|
{...props}
|
|
18
27
|
>
|
|
19
|
-
<NotificationBannerContent>
|
|
20
|
-
{children}
|
|
21
|
-
</NotificationBannerContent>
|
|
28
|
+
<NotificationBannerContent>{children}</NotificationBannerContent>
|
|
22
29
|
</NotificationBannerContainer>
|
|
23
30
|
);
|
|
24
31
|
}
|
|
@@ -8,10 +8,11 @@ exports[`renders the Hint with variant and src props 1`] = `
|
|
|
8
8
|
<ForwardRef(Base)
|
|
9
9
|
as="img"
|
|
10
10
|
className="govgr-image-logo--dark"
|
|
11
|
+
printHidden={true}
|
|
11
12
|
src="logo.png"
|
|
12
13
|
>
|
|
13
14
|
<img
|
|
14
|
-
className="govgr-image-logo--dark"
|
|
15
|
+
className="govgr-image-logo--dark govgr-print-hidden"
|
|
15
16
|
src="logo.png"
|
|
16
17
|
/>
|
|
17
18
|
</ForwardRef(Base)>
|
|
@@ -24,11 +25,12 @@ exports[`renders the Hint with src prop 1`] = `
|
|
|
24
25
|
>
|
|
25
26
|
<ForwardRef(Base)
|
|
26
27
|
as="img"
|
|
27
|
-
className="govgr-image-logo
|
|
28
|
+
className="govgr-image-logo"
|
|
29
|
+
printHidden={true}
|
|
28
30
|
src="logo.png"
|
|
29
31
|
>
|
|
30
32
|
<img
|
|
31
|
-
className="govgr-image-logo
|
|
33
|
+
className="govgr-image-logo govgr-print-hidden"
|
|
32
34
|
src="logo.png"
|
|
33
35
|
/>
|
|
34
36
|
</ForwardRef(Base)>
|
|
@@ -8,6 +8,13 @@ export interface ModalContainerProps extends BaseProps<'div'> {
|
|
|
8
8
|
* @value false
|
|
9
9
|
*/
|
|
10
10
|
open?: boolean
|
|
11
|
+
/**
|
|
12
|
+
* dense is optional.
|
|
13
|
+
* @value true ModalContainer and its children will be dense.
|
|
14
|
+
* @value false
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
dense?: boolean;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
20
|
* Modals can be used to open a pop-up dialog box and provide critical information
|
|
@@ -18,7 +25,7 @@ export interface ModalContainerProps extends BaseProps<'div'> {
|
|
|
18
25
|
export const ModalContainer = React.forwardRef<
|
|
19
26
|
HTMLDivElement,
|
|
20
27
|
ModalContainerProps
|
|
21
|
-
>(function ModalContainer({ className, children, open, ...props }, ref) {
|
|
28
|
+
>(function ModalContainer({ className, children, open, dense, ...props }, ref) {
|
|
22
29
|
return (
|
|
23
30
|
<Base
|
|
24
31
|
as="div"
|
|
@@ -26,6 +33,7 @@ export const ModalContainer = React.forwardRef<
|
|
|
26
33
|
className={clsx(className, {
|
|
27
34
|
'govgr-modal': true,
|
|
28
35
|
'govgr-modal--open': open,
|
|
36
|
+
'govgr-modal--dense': dense,
|
|
29
37
|
})}
|
|
30
38
|
{...props}
|
|
31
39
|
>
|