@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
|
@@ -1,13 +1,100 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the Nav with border prop 1`] = `
|
|
4
|
+
<ForwardRef(Nav)
|
|
5
|
+
border={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
as="nav"
|
|
9
|
+
className="govgr-nav--border govgr-nav"
|
|
10
|
+
>
|
|
11
|
+
<nav
|
|
12
|
+
className="govgr-nav--border govgr-nav"
|
|
13
|
+
>
|
|
14
|
+
hello
|
|
15
|
+
</nav>
|
|
16
|
+
</ForwardRef(Base)>
|
|
17
|
+
</ForwardRef(Nav)>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
exports[`renders the Nav with drawer="always" prop 1`] = `
|
|
21
|
+
<ForwardRef(Nav)
|
|
22
|
+
drawer="always"
|
|
23
|
+
>
|
|
24
|
+
<ForwardRef(Base)
|
|
25
|
+
as="nav"
|
|
26
|
+
className="govgr-nav--drawer govgr-nav--hidden govgr-nav--border govgr-nav"
|
|
27
|
+
>
|
|
28
|
+
<nav
|
|
29
|
+
className="govgr-nav--drawer govgr-nav--hidden govgr-nav--border govgr-nav"
|
|
30
|
+
>
|
|
31
|
+
hello
|
|
32
|
+
</nav>
|
|
33
|
+
</ForwardRef(Base)>
|
|
34
|
+
</ForwardRef(Nav)>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
exports[`renders the Nav with drawer="always", border and open props 1`] = `
|
|
38
|
+
<ForwardRef(Nav)
|
|
39
|
+
border={true}
|
|
40
|
+
drawer="always"
|
|
41
|
+
open={true}
|
|
42
|
+
>
|
|
43
|
+
<ForwardRef(Base)
|
|
44
|
+
as="nav"
|
|
45
|
+
className="govgr-nav--drawer govgr-nav--border govgr-nav"
|
|
46
|
+
>
|
|
47
|
+
<nav
|
|
48
|
+
className="govgr-nav--drawer govgr-nav--border govgr-nav"
|
|
49
|
+
>
|
|
50
|
+
hello
|
|
51
|
+
</nav>
|
|
52
|
+
</ForwardRef(Base)>
|
|
53
|
+
</ForwardRef(Nav)>
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
exports[`renders the Nav with drawer="mdDown" prop 1`] = `
|
|
57
|
+
<ForwardRef(Nav)
|
|
58
|
+
drawer="mdDown"
|
|
59
|
+
>
|
|
60
|
+
<ForwardRef(Base)
|
|
61
|
+
as="nav"
|
|
62
|
+
className="govgr-nav--drawer-mdDown govgr-nav--hidden govgr-nav--border govgr-nav"
|
|
63
|
+
>
|
|
64
|
+
<nav
|
|
65
|
+
className="govgr-nav--drawer-mdDown govgr-nav--hidden govgr-nav--border govgr-nav"
|
|
66
|
+
>
|
|
67
|
+
hello
|
|
68
|
+
</nav>
|
|
69
|
+
</ForwardRef(Base)>
|
|
70
|
+
</ForwardRef(Nav)>
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
exports[`renders the Nav with drawer="never" prop 1`] = `
|
|
74
|
+
<ForwardRef(Nav)
|
|
75
|
+
drawer="never"
|
|
76
|
+
>
|
|
77
|
+
<ForwardRef(Base)
|
|
78
|
+
as="nav"
|
|
79
|
+
className="govgr-nav--border govgr-nav"
|
|
80
|
+
>
|
|
81
|
+
<nav
|
|
82
|
+
className="govgr-nav--border govgr-nav"
|
|
83
|
+
>
|
|
84
|
+
hello
|
|
85
|
+
</nav>
|
|
86
|
+
</ForwardRef(Base)>
|
|
87
|
+
</ForwardRef(Nav)>
|
|
88
|
+
`;
|
|
89
|
+
|
|
3
90
|
exports[`renders the Nav with no props 1`] = `
|
|
4
91
|
<ForwardRef(Nav)>
|
|
5
92
|
<ForwardRef(Base)
|
|
6
93
|
as="nav"
|
|
7
|
-
className="govgr-nav--border govgr-nav
|
|
94
|
+
className="govgr-nav--border govgr-nav"
|
|
8
95
|
>
|
|
9
96
|
<nav
|
|
10
|
-
className="govgr-nav--border govgr-nav
|
|
97
|
+
className="govgr-nav--border govgr-nav"
|
|
11
98
|
>
|
|
12
99
|
hello
|
|
13
100
|
</nav>
|
|
@@ -21,10 +108,10 @@ exports[`renders the Nav with open prop 1`] = `
|
|
|
21
108
|
>
|
|
22
109
|
<ForwardRef(Base)
|
|
23
110
|
as="nav"
|
|
24
|
-
className="govgr-nav--border govgr-nav
|
|
111
|
+
className="govgr-nav--border govgr-nav"
|
|
25
112
|
>
|
|
26
113
|
<nav
|
|
27
|
-
className="govgr-nav--border govgr-nav
|
|
114
|
+
className="govgr-nav--border govgr-nav"
|
|
28
115
|
>
|
|
29
116
|
hello
|
|
30
117
|
</nav>
|
package/src/Nav/index.test.tsx
CHANGED
|
@@ -10,3 +10,18 @@ it('renders the Nav with no props', () => {
|
|
|
10
10
|
it('renders the Nav with open prop', () => {
|
|
11
11
|
expect(mount(<Nav open>hello</Nav>)).toMatchSnapshot();
|
|
12
12
|
});
|
|
13
|
+
it('renders the Nav with border prop', () => {
|
|
14
|
+
expect(mount(<Nav border>hello</Nav>)).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it('renders the Nav with drawer="never" prop', () => {
|
|
17
|
+
expect(mount(<Nav drawer="never">hello</Nav>)).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
it('renders the Nav with drawer="mdDown" prop', () => {
|
|
20
|
+
expect(mount(<Nav drawer="mdDown">hello</Nav>)).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
it('renders the Nav with drawer="always" prop', () => {
|
|
23
|
+
expect(mount(<Nav drawer="always">hello</Nav>)).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
it('renders the Nav with drawer="always", border and open props', () => {
|
|
26
|
+
expect(mount(<Nav open border drawer="always">hello</Nav>)).toMatchSnapshot();
|
|
27
|
+
});
|
package/src/Nav/index.tsx
CHANGED
|
@@ -1,32 +1,53 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
import CloseButton from '@digigov/react-core/CloseButton';
|
|
4
5
|
|
|
5
6
|
export interface NavProps extends BaseProps<'nav'> {
|
|
6
7
|
/**
|
|
7
8
|
* open is optional.
|
|
8
|
-
* use this prop to
|
|
9
|
+
* use this prop to control the navigation's visibility when it's a drawer.
|
|
9
10
|
* @value true
|
|
10
11
|
* @value false
|
|
11
12
|
* @default false
|
|
12
13
|
*/
|
|
13
14
|
open?: boolean;
|
|
14
15
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
* border is optional.
|
|
17
|
+
* border prop contains border-bottom styling.
|
|
18
|
+
* @value true
|
|
19
|
+
* @value false
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
border?: boolean;
|
|
23
|
+
|
|
22
24
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* drawer is optional.
|
|
26
|
+
* drawer prop allows element to be positioned relative to the viewport.
|
|
27
|
+
* Use this prop only if you want to implement responsive drawer navigation and you have a button to toggle the drawer open and closed.
|
|
28
|
+
* @value 'never' the navigation will never be drawer
|
|
29
|
+
* @value 'smDown' the navigation will be drawer on small screens only
|
|
30
|
+
* @value 'mdDown' the navigation will be drawer on medium screens and below
|
|
31
|
+
* @value 'lgDown' the navigation will be drawer on large screens and below
|
|
32
|
+
* @value 'always' the navigation will be drawer on all screen sizes
|
|
33
|
+
* @default 'never'
|
|
34
|
+
*/
|
|
35
|
+
drawer?: 'never' | 'smDown' | 'mdDown' | 'lgDown' | 'always';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* onClose makes a CloseButton component visible when the Nav is drawer.
|
|
39
|
+
* Use this prop to close the drawer when close button is clicked, passing a callback function.
|
|
40
|
+
* Make sure that the drawer prop is not 'never'.
|
|
28
41
|
*/
|
|
29
|
-
|
|
42
|
+
onClose?: (
|
|
43
|
+
e: React.MouseEvent<HTMLButtonElement, MouseEvent>
|
|
44
|
+
) => void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* closeButtonLabel is optional.
|
|
48
|
+
* Use this prop to add text beside the close icon. For example: 'Κλείσιμο'.
|
|
49
|
+
*/
|
|
50
|
+
closeButtonLabel?: string;
|
|
30
51
|
}
|
|
31
52
|
/**
|
|
32
53
|
* Nav is mainly used under the Header.
|
|
@@ -35,9 +56,10 @@ export interface NavProps extends BaseProps<'nav'> {
|
|
|
35
56
|
export const Nav = React.forwardRef<HTMLElement, NavProps>(function Nav(
|
|
36
57
|
{
|
|
37
58
|
className,
|
|
38
|
-
open
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
open,
|
|
60
|
+
drawer = 'never',
|
|
61
|
+
onClose,
|
|
62
|
+
closeButtonLabel,
|
|
41
63
|
border = true,
|
|
42
64
|
children,
|
|
43
65
|
...props
|
|
@@ -50,13 +72,24 @@ export const Nav = React.forwardRef<HTMLElement, NavProps>(function Nav(
|
|
|
50
72
|
ref={ref}
|
|
51
73
|
className={clsx(className, {
|
|
52
74
|
'govgr-nav': true,
|
|
53
|
-
'govgr-nav--fixed': fixed,
|
|
54
75
|
'govgr-nav--border': border,
|
|
55
|
-
'govgr-nav--
|
|
56
|
-
'govgr-nav--
|
|
76
|
+
'govgr-nav--hidden': drawer != 'never' && !open,
|
|
77
|
+
'govgr-nav--drawer-smDown': drawer === 'smDown',
|
|
78
|
+
'govgr-nav--drawer-mdDown': drawer === 'mdDown',
|
|
79
|
+
'govgr-nav--drawer-lgDown': drawer === 'lgDown',
|
|
80
|
+
'govgr-nav--drawer': drawer === 'always',
|
|
57
81
|
})}
|
|
58
82
|
{...props}
|
|
59
83
|
>
|
|
84
|
+
{(onClose && drawer !== 'never') && (
|
|
85
|
+
<CloseButton
|
|
86
|
+
smUpHidden={drawer === 'smDown'}
|
|
87
|
+
mdUpHidden={drawer === 'mdDown'}
|
|
88
|
+
lgUpHidden={drawer === 'lgDown'}
|
|
89
|
+
onClick={(e) => onClose(e)}
|
|
90
|
+
label={closeButtonLabel}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
60
93
|
{children}
|
|
61
94
|
</Base>
|
|
62
95
|
);
|
|
@@ -1,5 +1,109 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the NavMenuContainer with active prop 1`] = `
|
|
4
|
+
<ForwardRef(NavMenuContainer)
|
|
5
|
+
active={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
aria-hidden={false}
|
|
9
|
+
as="div"
|
|
10
|
+
className="govgr-nav-menu--horizontal govgr-nav-menu"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
aria-hidden={false}
|
|
14
|
+
className="govgr-nav-menu--horizontal govgr-nav-menu"
|
|
15
|
+
>
|
|
16
|
+
<ForwardRef(Container)
|
|
17
|
+
grid={true}
|
|
18
|
+
>
|
|
19
|
+
<ForwardRef(Base)
|
|
20
|
+
as="div"
|
|
21
|
+
className="govgr-container"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
className="govgr-container"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
className="govgr-main-wrapper"
|
|
28
|
+
>
|
|
29
|
+
hello
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</ForwardRef(Base)>
|
|
33
|
+
</ForwardRef(Container)>
|
|
34
|
+
</div>
|
|
35
|
+
</ForwardRef(Base)>
|
|
36
|
+
</ForwardRef(NavMenuContainer)>
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
exports[`renders the NavMenuContainer with layout="horizontal" prop 1`] = `
|
|
40
|
+
<ForwardRef(NavMenuContainer)
|
|
41
|
+
layout="horizontal"
|
|
42
|
+
>
|
|
43
|
+
<ForwardRef(Base)
|
|
44
|
+
aria-hidden={true}
|
|
45
|
+
as="div"
|
|
46
|
+
className="govgr-nav-menu--horizontal govgr-nav-menu--hidden govgr-nav-menu"
|
|
47
|
+
>
|
|
48
|
+
<div
|
|
49
|
+
aria-hidden={true}
|
|
50
|
+
className="govgr-nav-menu--horizontal govgr-nav-menu--hidden govgr-nav-menu"
|
|
51
|
+
>
|
|
52
|
+
<ForwardRef(Container)
|
|
53
|
+
grid={true}
|
|
54
|
+
>
|
|
55
|
+
<ForwardRef(Base)
|
|
56
|
+
as="div"
|
|
57
|
+
className="govgr-container"
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
className="govgr-container"
|
|
61
|
+
>
|
|
62
|
+
<div
|
|
63
|
+
className="govgr-main-wrapper"
|
|
64
|
+
>
|
|
65
|
+
hello
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</ForwardRef(Base)>
|
|
69
|
+
</ForwardRef(Container)>
|
|
70
|
+
</div>
|
|
71
|
+
</ForwardRef(Base)>
|
|
72
|
+
</ForwardRef(NavMenuContainer)>
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
exports[`renders the NavMenuContainer with layout="vertical" prop 1`] = `
|
|
76
|
+
<ForwardRef(NavMenuContainer)
|
|
77
|
+
layout="vertical"
|
|
78
|
+
>
|
|
79
|
+
<ForwardRef(Base)
|
|
80
|
+
aria-hidden={true}
|
|
81
|
+
as="div"
|
|
82
|
+
className="govgr-nav-menu--vertical govgr-nav-menu--hidden govgr-nav-menu"
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
aria-hidden={true}
|
|
86
|
+
className="govgr-nav-menu--vertical govgr-nav-menu--hidden govgr-nav-menu"
|
|
87
|
+
>
|
|
88
|
+
<ForwardRef(Container)
|
|
89
|
+
grid={false}
|
|
90
|
+
>
|
|
91
|
+
<ForwardRef(Base)
|
|
92
|
+
as="div"
|
|
93
|
+
className="govgr-container"
|
|
94
|
+
>
|
|
95
|
+
<div
|
|
96
|
+
className="govgr-container"
|
|
97
|
+
>
|
|
98
|
+
hello
|
|
99
|
+
</div>
|
|
100
|
+
</ForwardRef(Base)>
|
|
101
|
+
</ForwardRef(Container)>
|
|
102
|
+
</div>
|
|
103
|
+
</ForwardRef(Base)>
|
|
104
|
+
</ForwardRef(NavMenuContainer)>
|
|
105
|
+
`;
|
|
106
|
+
|
|
3
107
|
exports[`renders the NavMenuContainer with no props 1`] = `
|
|
4
108
|
<ForwardRef(NavMenuContainer)>
|
|
5
109
|
<ForwardRef(Base)
|
|
@@ -5,3 +5,12 @@ import NavMenuContainer from '@digigov/react-core/NavMenuContainer';
|
|
|
5
5
|
it('renders the NavMenuContainer with no props', () => {
|
|
6
6
|
expect(mount(<NavMenuContainer>hello</NavMenuContainer>)).toMatchSnapshot();
|
|
7
7
|
});
|
|
8
|
+
it('renders the NavMenuContainer with active prop', () => {
|
|
9
|
+
expect(mount(<NavMenuContainer active>hello</NavMenuContainer>)).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
it('renders the NavMenuContainer with layout="vertical" prop', () => {
|
|
12
|
+
expect(mount(<NavMenuContainer layout="vertical">hello</NavMenuContainer>)).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
it('renders the NavMenuContainer with layout="horizontal" prop', () => {
|
|
15
|
+
expect(mount(<NavMenuContainer layout="horizontal">hello</NavMenuContainer>)).toMatchSnapshot();
|
|
16
|
+
});
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the NotificationBannerContainer with dense=true 1`] = `
|
|
4
|
+
<ForwardRef(NotificationBannerContainer)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
aria-labelledby="govgr-notification-banner-title"
|
|
9
|
+
as="div"
|
|
10
|
+
className="govgr-notification-banner--info govgr-notification-banner--dense govgr-notification-banner"
|
|
11
|
+
data-module="govgr-notification-banner"
|
|
12
|
+
role="region"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
aria-labelledby="govgr-notification-banner-title"
|
|
16
|
+
className="govgr-notification-banner--info govgr-notification-banner--dense govgr-notification-banner"
|
|
17
|
+
data-module="govgr-notification-banner"
|
|
18
|
+
role="region"
|
|
19
|
+
>
|
|
20
|
+
hello
|
|
21
|
+
</div>
|
|
22
|
+
</ForwardRef(Base)>
|
|
23
|
+
</ForwardRef(NotificationBannerContainer)>
|
|
24
|
+
`;
|
|
25
|
+
|
|
3
26
|
exports[`renders the NotificationBannerContainer with no props 1`] = `
|
|
4
27
|
<ForwardRef(NotificationBannerContainer)>
|
|
5
28
|
<ForwardRef(Base)
|
|
@@ -19,3 +19,10 @@ it('renders the NotificationBannerContainer with variant=success', () => {
|
|
|
19
19
|
).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
it('renders the NotificationBannerContainer with dense=true', () => {
|
|
23
|
+
expect(
|
|
24
|
+
mount(
|
|
25
|
+
<NotificationBannerContainer dense>hello</NotificationBannerContainer>
|
|
26
|
+
)
|
|
27
|
+
).toMatchSnapshot();
|
|
28
|
+
});
|
|
@@ -12,6 +12,13 @@ export interface NotificationBannerContainerProps extends BaseProps<'div'> {
|
|
|
12
12
|
* @default 'info'.
|
|
13
13
|
*/
|
|
14
14
|
variant?: 'info' | 'success' | 'error';
|
|
15
|
+
/**
|
|
16
|
+
* dense is optional.
|
|
17
|
+
* @value true NotificationBannerContainer will be dense.
|
|
18
|
+
* @value false
|
|
19
|
+
* @default false
|
|
20
|
+
* */
|
|
21
|
+
dense?: boolean;
|
|
15
22
|
}
|
|
16
23
|
/**
|
|
17
24
|
* Details for the NotificationBannerContainer.
|
|
@@ -24,7 +31,7 @@ export const NotificationBannerContainer = React.forwardRef<
|
|
|
24
31
|
HTMLDivElement,
|
|
25
32
|
NotificationBannerContainerProps
|
|
26
33
|
>(function NotificationBannerContainer(
|
|
27
|
-
{ variant = 'info', className, children, ...props },
|
|
34
|
+
{ variant = 'info', className, dense, children, ...props },
|
|
28
35
|
ref
|
|
29
36
|
) {
|
|
30
37
|
return (
|
|
@@ -37,6 +44,7 @@ export const NotificationBannerContainer = React.forwardRef<
|
|
|
37
44
|
className={clsx(className, {
|
|
38
45
|
'govgr-notification-banner': true,
|
|
39
46
|
[`govgr-notification-banner--${variant}`]: variant !== undefined,
|
|
47
|
+
'govgr-notification-banner--dense': dense,
|
|
40
48
|
})}
|
|
41
49
|
{...props}
|
|
42
50
|
>
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the RadioContainer with dense prop 1`] = `
|
|
4
|
+
<ForwardRef(RadioContainer)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
as="div"
|
|
9
|
+
className="govgr-radios--dense govgr-radios"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
className="govgr-radios--dense govgr-radios"
|
|
13
|
+
>
|
|
14
|
+
hello
|
|
15
|
+
</div>
|
|
16
|
+
</ForwardRef(Base)>
|
|
17
|
+
</ForwardRef(RadioContainer)>
|
|
18
|
+
`;
|
|
19
|
+
|
|
3
20
|
exports[`renders the RadioContainer with layout=horizontal 1`] = `
|
|
4
21
|
<ForwardRef(RadioContainer)
|
|
5
22
|
layout="horizontal"
|
|
@@ -9,3 +9,6 @@ it('renders the RadioContainer with no props', () => {
|
|
|
9
9
|
it('renders the RadioContainer with layout=horizontal', () => {
|
|
10
10
|
expect(mount(<RadioContainer layout='horizontal'>hello</RadioContainer>)).toMatchSnapshot();
|
|
11
11
|
});
|
|
12
|
+
it('renders the RadioContainer with dense prop', () => {
|
|
13
|
+
expect(mount(<RadioContainer dense>hello</RadioContainer>)).toMatchSnapshot();
|
|
14
|
+
});
|
|
@@ -10,6 +10,13 @@ export interface RadioContainerProps extends BaseProps<'div'> {
|
|
|
10
10
|
* @default 'vertical'
|
|
11
11
|
*/
|
|
12
12
|
layout?: 'horizontal' | 'vertical';
|
|
13
|
+
/**
|
|
14
|
+
* dense is optional.
|
|
15
|
+
* @value true Radios will be dense.
|
|
16
|
+
* @value false
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
dense?: boolean;
|
|
13
20
|
}
|
|
14
21
|
/**
|
|
15
22
|
* RadioContainer component is uses when users can only select one option from a list.
|
|
@@ -18,13 +25,14 @@ export interface RadioContainerProps extends BaseProps<'div'> {
|
|
|
18
25
|
export const RadioContainer = React.forwardRef<
|
|
19
26
|
HTMLDivElement,
|
|
20
27
|
RadioContainerProps
|
|
21
|
-
>(function RadioContainer({ className, children,
|
|
28
|
+
>(function RadioContainer({ layout, dense, className, children, ...props }, ref) {
|
|
22
29
|
return (
|
|
23
30
|
<Base
|
|
24
31
|
as="div"
|
|
25
32
|
ref={ref}
|
|
26
33
|
className={clsx(className, {
|
|
27
34
|
'govgr-radios': true,
|
|
35
|
+
'govgr-radios--dense': dense,
|
|
28
36
|
'govgr-radios--horizontal': layout === 'horizontal',
|
|
29
37
|
})}
|
|
30
38
|
{...props}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`renders the RadioItem \`
|
|
3
|
+
exports[`renders the RadioItem \`dividerText\` props 1`] = `
|
|
4
4
|
<ForwardRef(RadioItem)
|
|
5
5
|
dividerText="ή"
|
|
6
6
|
>
|
|
@@ -88,7 +88,7 @@ exports[`renders the RadioItem value props 1`] = `
|
|
|
88
88
|
</ForwardRef(RadioItem)>
|
|
89
89
|
`;
|
|
90
90
|
|
|
91
|
-
exports[`renders the RadioItem with \`name\`, \`disabled\`, \`
|
|
91
|
+
exports[`renders the RadioItem with \`name\`, \`disabled\`, \`dividerText\` and \`value\` props 1`] = `
|
|
92
92
|
<ForwardRef(RadioItem)
|
|
93
93
|
disabled={true}
|
|
94
94
|
dividerText="ή"
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the SelectContainer with dense prop 1`] = `
|
|
4
|
+
<ForwardRef(SelectContainer)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
as="select"
|
|
9
|
+
className="govgr-select--dense govgr-select"
|
|
10
|
+
>
|
|
11
|
+
<select
|
|
12
|
+
className="govgr-select--dense govgr-select"
|
|
13
|
+
>
|
|
14
|
+
hello
|
|
15
|
+
</select>
|
|
16
|
+
</ForwardRef(Base)>
|
|
17
|
+
</ForwardRef(SelectContainer)>
|
|
18
|
+
`;
|
|
19
|
+
|
|
3
20
|
exports[`renders the SelectContainer with name and defaultValue 1`] = `
|
|
4
21
|
<ForwardRef(SelectContainer)
|
|
5
22
|
defaultValue="some-value"
|
|
@@ -12,6 +12,11 @@ it('renders the SelectContainer with name props', () => {
|
|
|
12
12
|
mount(<SelectContainer name={'some-name'}>hello</SelectContainer>)
|
|
13
13
|
).toMatchSnapshot();
|
|
14
14
|
});
|
|
15
|
+
it('renders the SelectContainer with dense prop', () => {
|
|
16
|
+
expect(
|
|
17
|
+
mount(<SelectContainer dense>hello</SelectContainer>)
|
|
18
|
+
).toMatchSnapshot();
|
|
19
|
+
});
|
|
15
20
|
|
|
16
21
|
it('renders the SelectContainer with name and defaultValue', () => {
|
|
17
22
|
expect(
|
|
@@ -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 SelectContainerProps extends BaseProps<'select'> {
|
|
5
|
+
export interface SelectContainerProps extends BaseProps<'select'> {
|
|
6
|
+
/**
|
|
7
|
+
* dense is optional.
|
|
8
|
+
* @value true Select will be dense.
|
|
9
|
+
* @value false
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
dense?: boolean;
|
|
13
|
+
}
|
|
6
14
|
/**
|
|
7
15
|
* The SelectContainer component allows users to choose an option from a long list.
|
|
8
16
|
* It is used as a parent component to wrap SelectOption component.
|
|
@@ -10,13 +18,14 @@ export interface SelectContainerProps extends BaseProps<'select'> {}
|
|
|
10
18
|
export const SelectContainer = React.forwardRef<
|
|
11
19
|
HTMLSelectElement,
|
|
12
20
|
SelectContainerProps
|
|
13
|
-
>(function SelectContainer({ className, children, ...props }, ref) {
|
|
21
|
+
>(function SelectContainer({ dense, className, children, ...props }, ref) {
|
|
14
22
|
return (
|
|
15
23
|
<Base
|
|
16
24
|
as="select"
|
|
17
25
|
ref={ref}
|
|
18
26
|
className={clsx(className, {
|
|
19
27
|
'govgr-select': true,
|
|
28
|
+
'govgr-select--dense': dense,
|
|
20
29
|
})}
|
|
21
30
|
{...props}
|
|
22
31
|
>
|
|
@@ -6,10 +6,10 @@ exports[`renders the StepNav with dense props 1`] = `
|
|
|
6
6
|
>
|
|
7
7
|
<ForwardRef(Base)
|
|
8
8
|
as="div"
|
|
9
|
-
className="govgr-step--dense govgr-step-nav"
|
|
9
|
+
className="govgr-step-nav--dense govgr-step-nav"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
-
className="govgr-step--dense govgr-step-nav"
|
|
12
|
+
className="govgr-step-nav--dense govgr-step-nav"
|
|
13
13
|
>
|
|
14
14
|
hello
|
|
15
15
|
</div>
|
package/src/Tabs/index.tsx
CHANGED
|
@@ -2,13 +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 TabsProps extends BaseProps<'div'> {
|
|
5
|
+
export interface TabsProps extends BaseProps<'div'> {
|
|
6
|
+
direction?: 'vertical' | 'horizontal'
|
|
7
|
+
}
|
|
6
8
|
/**
|
|
7
9
|
* Tabs is the main component for tabs.
|
|
8
10
|
* This component must contain TabsHeading, TabsList, and a list of TabsPanel component.
|
|
9
11
|
*/
|
|
10
12
|
export const Tabs = React.forwardRef<HTMLDivElement, TabsProps>(function Tabs(
|
|
11
|
-
{ className, children, ...props },
|
|
13
|
+
{ direction, className, children, ...props },
|
|
12
14
|
ref
|
|
13
15
|
) {
|
|
14
16
|
return (
|
|
@@ -17,6 +19,7 @@ export const Tabs = React.forwardRef<HTMLDivElement, TabsProps>(function Tabs(
|
|
|
17
19
|
ref={ref}
|
|
18
20
|
className={clsx(className, {
|
|
19
21
|
'govgr-tabs': true,
|
|
22
|
+
'govgr-tabs--vertical': direction ==='vertical',
|
|
20
23
|
})}
|
|
21
24
|
{...props}
|
|
22
25
|
>
|
|
@@ -6,10 +6,10 @@ exports[`renders the TaskList with dense prop 1`] = `
|
|
|
6
6
|
>
|
|
7
7
|
<ForwardRef(Base)
|
|
8
8
|
as="ol"
|
|
9
|
-
className="govgr-task--dense govgr-task-list"
|
|
9
|
+
className="govgr-task-list--dense govgr-task-list"
|
|
10
10
|
>
|
|
11
11
|
<ol
|
|
12
|
-
className="govgr-task--dense govgr-task-list"
|
|
12
|
+
className="govgr-task-list--dense govgr-task-list"
|
|
13
13
|
>
|
|
14
14
|
hello
|
|
15
15
|
</ol>
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`renders the TextArea with dense prop 1`] = `
|
|
4
|
+
<ForwardRef(TextArea)
|
|
5
|
+
dense={true}
|
|
6
|
+
>
|
|
7
|
+
<ForwardRef(Base)
|
|
8
|
+
as="textarea"
|
|
9
|
+
className="govgr-textarea--dense govgr-textarea"
|
|
10
|
+
rows={3}
|
|
11
|
+
>
|
|
12
|
+
<textarea
|
|
13
|
+
className="govgr-textarea--dense govgr-textarea"
|
|
14
|
+
rows={3}
|
|
15
|
+
>
|
|
16
|
+
hello
|
|
17
|
+
</textarea>
|
|
18
|
+
</ForwardRef(Base)>
|
|
19
|
+
</ForwardRef(TextArea)>
|
|
20
|
+
`;
|
|
21
|
+
|
|
3
22
|
exports[`renders the TextArea with no props 1`] = `
|
|
4
23
|
<ForwardRef(TextArea)>
|
|
5
24
|
<ForwardRef(Base)
|
|
@@ -26,3 +26,6 @@ it('renders the TextArea with rows=7', () => {
|
|
|
26
26
|
it('renders the TextArea with rows=8', () => {
|
|
27
27
|
expect(mount(<TextArea rows={8}>hello</TextArea>)).toMatchSnapshot();
|
|
28
28
|
});
|
|
29
|
+
it('renders the TextArea with dense prop', () => {
|
|
30
|
+
expect(mount(<TextArea dense>hello</TextArea>)).toMatchSnapshot();
|
|
31
|
+
});
|