@digigov/react-core 1.0.0-079f34f3d → 1.0.0-266e80f3
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/Accordion/__snapshots__/index.test.tsx.snap +2 -2
- package/AdminAside/index.d.ts +1 -1
- package/AdminContainer/__snapshots__/index.test.tsx.snap +21 -11
- package/AdminContainer/index.d.ts +1 -1
- package/AdminMain/index.d.ts +1 -1
- package/AdminTopSection/index.d.ts +1 -1
- package/Aside/__snapshots__/index.test.tsx.snap +16 -7
- package/Aside/index.d.ts +5 -5
- package/Aside/index.js +9 -5
- package/BottomInfo/__snapshots__/index.test.tsx.snap +11 -15
- package/BottomInfo/index.d.ts +1 -1
- package/BottomInfoContainer/__snapshots__/index.test.tsx.snap +11 -15
- package/BottomInfoContainer/index.d.ts +1 -1
- package/BottomInfoContent/__snapshots__/index.test.tsx.snap +3 -6
- package/BottomInfoContent/index.d.ts +1 -1
- package/BottomInfoContent/index.js +2 -11
- package/ChipHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/CircularProgress/__snapshots__/index.test.tsx.snap +12 -12
- package/CircularProgress/index.js +2 -2
- package/Container/__snapshots__/index.test.tsx.snap +32 -44
- package/Container/index.d.ts +12 -12
- package/Container/index.js +7 -6
- package/Drawer/__snapshots__/index.test.tsx.snap +10 -5
- package/DropdownContent/__snapshots__/index.test.tsx.snap +2 -2
- package/FieldContainer/index.d.ts +1 -1
- package/FooterContainer/__snapshots__/index.test.tsx.snap +10 -14
- package/FooterContainer/index.d.ts +1 -1
- package/FooterHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/Grid/index.d.ts +64 -32
- package/Grid/index.js +1 -1
- package/Heading/__snapshots__/index.test.tsx.snap +190 -95
- package/HeadingCaption/__snapshots__/index.test.tsx.snap +40 -20
- package/ImageLogo/__snapshots__/index.test.tsx.snap +36 -0
- package/ImageLogo/index.d.ts +20 -0
- package/ImageLogo/index.js +45 -0
- package/ImageLogo/index.test.js +26 -0
- package/ImageLogoSet/__snapshots__/index.test.tsx.snap +118 -0
- package/ImageLogoSet/index.d.ts +20 -0
- package/ImageLogoSet/index.js +45 -0
- package/ImageLogoSet/index.test.d.ts +1 -0
- package/ImageLogoSet/index.test.js +29 -0
- package/Main/__snapshots__/index.test.tsx.snap +16 -7
- package/Main/index.d.ts +4 -4
- package/Main/index.js +7 -4
- package/ModalHeading/__snapshots__/index.test.tsx.snap +12 -6
- package/NavMenuContainer/__snapshots__/index.test.tsx.snap +13 -15
- package/NavMenuContainer/index.js +1 -0
- package/NavMenuContent/__snapshots__/index.test.tsx.snap +5 -3
- package/NavMenuContent/index.d.ts +1 -1
- package/NavMenuContent/index.js +3 -1
- package/NavMenuTitle/__snapshots__/index.test.tsx.snap +4 -3
- package/NavMenuTitle/index.js +2 -1
- package/NotificationBannerHeader/__snapshots__/index.test.tsx.snap +12 -6
- package/NotificationBannerHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/PageTitleCaption/__snapshots__/index.test.tsx.snap +50 -25
- package/PageTitleHeading/__snapshots__/index.test.tsx.snap +50 -25
- package/TabsHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/TabsListItem/__snapshots__/index.test.tsx.snap +25 -25
- package/TaskListItemHeading/__snapshots__/index.test.tsx.snap +66 -30
- package/TextInput/__snapshots__/index.test.tsx.snap +72 -72
- package/Unpurge/index.js +1 -1
- package/es/Accordion/__snapshots__/index.test.tsx.snap +2 -2
- package/es/AdminContainer/__snapshots__/index.test.tsx.snap +21 -11
- package/es/Aside/__snapshots__/index.test.tsx.snap +16 -7
- package/es/Aside/index.js +9 -5
- package/es/BottomInfo/__snapshots__/index.test.tsx.snap +11 -15
- package/es/BottomInfoContainer/__snapshots__/index.test.tsx.snap +11 -15
- package/es/BottomInfoContent/__snapshots__/index.test.tsx.snap +3 -6
- package/es/BottomInfoContent/index.js +2 -11
- package/es/ChipHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/es/CircularProgress/__snapshots__/index.test.tsx.snap +12 -12
- package/es/CircularProgress/index.js +2 -2
- package/es/Container/__snapshots__/index.test.tsx.snap +32 -44
- package/es/Container/index.js +7 -6
- package/es/Drawer/__snapshots__/index.test.tsx.snap +10 -5
- package/es/DropdownContent/__snapshots__/index.test.tsx.snap +2 -2
- package/es/FooterContainer/__snapshots__/index.test.tsx.snap +10 -14
- package/es/FooterHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/es/Grid/index.js +1 -1
- package/es/Heading/__snapshots__/index.test.tsx.snap +190 -95
- package/es/HeadingCaption/__snapshots__/index.test.tsx.snap +40 -20
- package/es/ImageLogo/__snapshots__/index.test.tsx.snap +36 -0
- package/es/ImageLogo/index.js +29 -0
- package/es/ImageLogo/index.test.js +20 -0
- package/es/ImageLogoSet/__snapshots__/index.test.tsx.snap +118 -0
- package/es/ImageLogoSet/index.js +30 -0
- package/es/ImageLogoSet/index.test.js +23 -0
- package/es/Main/__snapshots__/index.test.tsx.snap +16 -7
- package/es/Main/index.js +7 -4
- package/es/ModalHeading/__snapshots__/index.test.tsx.snap +12 -6
- package/es/NavMenuContainer/__snapshots__/index.test.tsx.snap +13 -15
- package/es/NavMenuContainer/index.js +1 -0
- package/es/NavMenuContent/__snapshots__/index.test.tsx.snap +5 -3
- package/es/NavMenuContent/index.js +3 -1
- package/es/NavMenuTitle/__snapshots__/index.test.tsx.snap +4 -3
- package/es/NavMenuTitle/index.js +2 -1
- package/es/NotificationBannerHeader/__snapshots__/index.test.tsx.snap +12 -6
- package/es/NotificationBannerHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/es/PageTitleCaption/__snapshots__/index.test.tsx.snap +50 -25
- package/es/PageTitleHeading/__snapshots__/index.test.tsx.snap +50 -25
- package/es/TabsHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/es/TabsListItem/__snapshots__/index.test.tsx.snap +25 -25
- package/es/TaskListItemHeading/__snapshots__/index.test.tsx.snap +66 -30
- package/es/TextInput/__snapshots__/index.test.tsx.snap +72 -72
- package/es/Unpurge/index.js +1 -1
- package/es/index.js +2 -1
- package/es/registry.js +4 -2
- package/esm/Accordion/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/AdminContainer/__snapshots__/index.test.tsx.snap +21 -11
- package/esm/Aside/__snapshots__/index.test.tsx.snap +16 -7
- package/esm/Aside/index.js +9 -5
- package/esm/BottomInfo/__snapshots__/index.test.tsx.snap +11 -15
- package/esm/BottomInfoContainer/__snapshots__/index.test.tsx.snap +11 -15
- package/esm/BottomInfoContent/__snapshots__/index.test.tsx.snap +3 -6
- package/esm/BottomInfoContent/index.js +2 -11
- package/esm/ChipHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/esm/CircularProgress/__snapshots__/index.test.tsx.snap +12 -12
- package/esm/CircularProgress/index.js +2 -2
- package/esm/Container/__snapshots__/index.test.tsx.snap +32 -44
- package/esm/Container/index.js +7 -6
- package/esm/Drawer/__snapshots__/index.test.tsx.snap +10 -5
- package/esm/DropdownContent/__snapshots__/index.test.tsx.snap +2 -2
- package/esm/FooterContainer/__snapshots__/index.test.tsx.snap +10 -14
- package/esm/FooterHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/esm/Grid/index.js +1 -1
- package/esm/Heading/__snapshots__/index.test.tsx.snap +190 -95
- package/esm/HeadingCaption/__snapshots__/index.test.tsx.snap +40 -20
- package/esm/ImageLogo/__snapshots__/index.test.tsx.snap +36 -0
- package/esm/ImageLogo/index.js +29 -0
- package/esm/ImageLogo/index.test.js +20 -0
- package/esm/ImageLogoSet/__snapshots__/index.test.tsx.snap +118 -0
- package/esm/ImageLogoSet/index.js +30 -0
- package/esm/ImageLogoSet/index.test.js +23 -0
- package/esm/Main/__snapshots__/index.test.tsx.snap +16 -7
- package/esm/Main/index.js +7 -4
- package/esm/ModalHeading/__snapshots__/index.test.tsx.snap +12 -6
- package/esm/NavMenuContainer/__snapshots__/index.test.tsx.snap +13 -15
- package/esm/NavMenuContainer/index.js +1 -0
- package/esm/NavMenuContent/__snapshots__/index.test.tsx.snap +5 -3
- package/esm/NavMenuContent/index.js +3 -1
- package/esm/NavMenuTitle/__snapshots__/index.test.tsx.snap +4 -3
- package/esm/NavMenuTitle/index.js +2 -1
- package/esm/NotificationBannerHeader/__snapshots__/index.test.tsx.snap +12 -6
- package/esm/NotificationBannerHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/esm/PageTitleCaption/__snapshots__/index.test.tsx.snap +50 -25
- package/esm/PageTitleHeading/__snapshots__/index.test.tsx.snap +50 -25
- package/esm/TabsHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/esm/TabsListItem/__snapshots__/index.test.tsx.snap +25 -25
- package/esm/TaskListItemHeading/__snapshots__/index.test.tsx.snap +66 -30
- package/esm/TextInput/__snapshots__/index.test.tsx.snap +72 -72
- package/esm/Unpurge/index.js +1 -1
- package/esm/index.js +3 -2
- package/esm/registry.js +4 -2
- package/index.d.ts +2 -1
- package/index.js +17 -4
- package/package.json +3 -3
- package/registry.d.ts +2 -1
- package/registry.js +5 -2
- package/src/Accordion/__snapshots__/index.test.tsx.snap +2 -2
- package/src/AdminContainer/__snapshots__/index.test.tsx.snap +21 -11
- package/src/Aside/__snapshots__/index.test.tsx.snap +16 -7
- package/src/Aside/index.tsx +10 -7
- package/src/BottomInfo/__snapshots__/index.test.tsx.snap +11 -15
- package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +11 -15
- package/src/BottomInfoContent/__snapshots__/index.test.tsx.snap +3 -6
- package/src/BottomInfoContent/index.tsx +1 -4
- package/src/ChipHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/src/CircularProgress/__snapshots__/index.test.tsx.snap +12 -12
- package/src/CircularProgress/index.tsx +2 -2
- package/src/Container/__snapshots__/index.test.tsx.snap +32 -44
- package/src/Container/index.tsx +16 -23
- package/src/Drawer/__snapshots__/index.test.tsx.snap +10 -5
- package/src/DropdownContent/__snapshots__/index.test.tsx.snap +2 -2
- package/src/FooterContainer/__snapshots__/index.test.tsx.snap +10 -14
- package/src/FooterHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/src/Grid/index.tsx +82 -39
- package/src/Heading/__snapshots__/index.test.tsx.snap +190 -95
- package/src/HeadingCaption/__snapshots__/index.test.tsx.snap +40 -20
- package/src/ImageLogo/__snapshots__/index.test.tsx.snap +36 -0
- package/src/ImageLogo/index.test.tsx +13 -0
- package/src/ImageLogo/index.tsx +43 -0
- package/src/ImageLogoSet/__snapshots__/index.test.tsx.snap +118 -0
- package/src/ImageLogoSet/index.test.tsx +17 -0
- package/src/ImageLogoSet/index.tsx +36 -0
- package/src/Main/__snapshots__/index.test.tsx.snap +16 -7
- package/src/Main/index.tsx +9 -6
- package/src/ModalHeading/__snapshots__/index.test.tsx.snap +12 -6
- package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +13 -15
- package/src/NavMenuContainer/index.tsx +1 -0
- package/src/NavMenuContent/__snapshots__/index.test.tsx.snap +5 -3
- package/src/NavMenuContent/index.tsx +1 -1
- package/src/NavMenuTitle/__snapshots__/index.test.tsx.snap +4 -3
- package/src/NavMenuTitle/index.tsx +2 -1
- package/src/NotificationBannerHeader/__snapshots__/index.test.tsx.snap +12 -6
- package/src/NotificationBannerHeading/__snapshots__/index.test.tsx.snap +10 -5
- package/src/PageTitleCaption/__snapshots__/index.test.tsx.snap +50 -25
- package/src/PageTitleHeading/__snapshots__/index.test.tsx.snap +50 -25
- package/src/TabsHeading/__snapshots__/index.test.tsx.snap +30 -15
- package/src/TabsListItem/__snapshots__/index.test.tsx.snap +25 -25
- package/src/TaskListItemHeading/__snapshots__/index.test.tsx.snap +66 -30
- package/src/TextInput/__snapshots__/index.test.tsx.snap +72 -72
- package/src/Unpurge/index.tsx +42 -0
- package/src/index.ts +2 -1
- package/src/registry.js +5 -4
- package/Icon/__snapshots__/index.test.tsx.snap +0 -343
- package/Icon/index.d.ts +0 -25
- package/Icon/index.js +0 -58
- package/Icon/index.test.js +0 -88
- package/es/Icon/__snapshots__/index.test.tsx.snap +0 -343
- package/es/Icon/index.js +0 -34
- package/es/Icon/index.test.js +0 -82
- package/esm/Icon/__snapshots__/index.test.tsx.snap +0 -343
- package/esm/Icon/index.js +0 -34
- package/esm/Icon/index.test.js +0 -82
- package/src/Icon/__snapshots__/index.test.tsx.snap +0 -343
- package/src/Icon/index.test.tsx +0 -36
- package/src/Icon/index.tsx +0 -63
- /package/{Icon → ImageLogo}/index.test.d.ts +0 -0
|
@@ -7,16 +7,21 @@ exports[`renders the FooterHeading with no props 1`] = `
|
|
|
7
7
|
element="h2"
|
|
8
8
|
size="sm"
|
|
9
9
|
>
|
|
10
|
-
<ForwardRef(
|
|
10
|
+
<ForwardRef(Typography)
|
|
11
11
|
as="h2"
|
|
12
12
|
className="govgr-footer__heading govgr-heading-sm"
|
|
13
13
|
>
|
|
14
|
-
<
|
|
14
|
+
<ForwardRef(Base)
|
|
15
|
+
as="h2"
|
|
15
16
|
className="govgr-footer__heading govgr-heading-sm"
|
|
16
17
|
>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
<h2
|
|
19
|
+
className="govgr-footer__heading govgr-heading-sm"
|
|
20
|
+
>
|
|
21
|
+
hello
|
|
22
|
+
</h2>
|
|
23
|
+
</ForwardRef(Base)>
|
|
24
|
+
</ForwardRef(Typography)>
|
|
20
25
|
</ForwardRef(Heading)>
|
|
21
26
|
</ForwardRef(FooterHeading)>
|
|
22
27
|
`;
|
|
@@ -30,16 +35,21 @@ exports[`renders the FooterHeading with size=m 1`] = `
|
|
|
30
35
|
element="h2"
|
|
31
36
|
size="md"
|
|
32
37
|
>
|
|
33
|
-
<ForwardRef(
|
|
38
|
+
<ForwardRef(Typography)
|
|
34
39
|
as="h2"
|
|
35
40
|
className="govgr-footer__heading govgr-heading-md"
|
|
36
41
|
>
|
|
37
|
-
<
|
|
42
|
+
<ForwardRef(Base)
|
|
43
|
+
as="h2"
|
|
38
44
|
className="govgr-footer__heading govgr-heading-md"
|
|
39
45
|
>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
<h2
|
|
47
|
+
className="govgr-footer__heading govgr-heading-md"
|
|
48
|
+
>
|
|
49
|
+
hello
|
|
50
|
+
</h2>
|
|
51
|
+
</ForwardRef(Base)>
|
|
52
|
+
</ForwardRef(Typography)>
|
|
43
53
|
</ForwardRef(Heading)>
|
|
44
54
|
</ForwardRef(FooterHeading)>
|
|
45
55
|
`;
|
|
@@ -53,16 +63,21 @@ exports[`renders the FooterHeading with size=s 1`] = `
|
|
|
53
63
|
element="h2"
|
|
54
64
|
size="sm"
|
|
55
65
|
>
|
|
56
|
-
<ForwardRef(
|
|
66
|
+
<ForwardRef(Typography)
|
|
57
67
|
as="h2"
|
|
58
68
|
className="govgr-footer__heading govgr-heading-sm"
|
|
59
69
|
>
|
|
60
|
-
<
|
|
70
|
+
<ForwardRef(Base)
|
|
71
|
+
as="h2"
|
|
61
72
|
className="govgr-footer__heading govgr-heading-sm"
|
|
62
73
|
>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
74
|
+
<h2
|
|
75
|
+
className="govgr-footer__heading govgr-heading-sm"
|
|
76
|
+
>
|
|
77
|
+
hello
|
|
78
|
+
</h2>
|
|
79
|
+
</ForwardRef(Base)>
|
|
80
|
+
</ForwardRef(Typography)>
|
|
66
81
|
</ForwardRef(Heading)>
|
|
67
82
|
</ForwardRef(FooterHeading)>
|
|
68
83
|
`;
|
package/src/Grid/index.tsx
CHANGED
|
@@ -3,54 +3,87 @@ import clsx from 'clsx';
|
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
5
|
type GridValues = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
6
|
+
type SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;
|
|
7
|
+
type SpacingMediaValues = {
|
|
8
|
+
xs?: SpacingValues;
|
|
9
|
+
sm?: SpacingValues;
|
|
10
|
+
md?: SpacingValues;
|
|
11
|
+
lg?: SpacingValues;
|
|
12
|
+
xl?: SpacingValues;
|
|
13
|
+
};
|
|
6
14
|
export interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {
|
|
7
15
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
* If true, the component will have the flex container behavior. You should be wrapping items with a container.
|
|
17
|
+
* @value true
|
|
18
|
+
* @value false
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
container?: boolean;
|
|
13
22
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
item?: boolean
|
|
23
|
+
* @value true
|
|
24
|
+
* @value false
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
item?: boolean;
|
|
19
28
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
inline?: boolean
|
|
24
|
-
/**
|
|
25
|
-
* @value 1
|
|
26
|
-
* @value 2
|
|
27
|
-
* @value 4
|
|
28
|
-
* @value 6
|
|
29
|
-
* @value 8
|
|
30
|
-
* @value 10
|
|
31
|
-
* @value 12
|
|
32
|
-
*/
|
|
33
|
-
spacing?: 1 | 2 | 4 | 6 | 8 | 10 | 12
|
|
29
|
+
* @value true
|
|
30
|
+
* @value false
|
|
31
|
+
*/
|
|
32
|
+
inline?: boolean;
|
|
34
33
|
/**
|
|
34
|
+
* Defines the space between the type item components. It can only be used on a type container component.
|
|
35
|
+
* @value 1
|
|
36
|
+
* @value 2
|
|
37
|
+
* @value 4
|
|
38
|
+
* @value 6
|
|
39
|
+
* @value 8
|
|
40
|
+
* @value 10
|
|
41
|
+
* @value 12
|
|
42
|
+
* @value object
|
|
43
|
+
* @default undefined
|
|
44
|
+
*/
|
|
45
|
+
spacing?: SpacingValues | SpacingMediaValues;
|
|
35
46
|
|
|
36
|
-
*/
|
|
37
|
-
xs?: GridValues
|
|
38
47
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
49
|
+
* It can't be greater than the total number of columns of the container (12).
|
|
50
|
+
* If 'auto', the grid item's width matches its content.
|
|
51
|
+
* If it's not set, the prop is ignored.
|
|
52
|
+
* The value is applied for all the screen sizes with the lowest priority.
|
|
53
|
+
*/
|
|
54
|
+
xs?: GridValues;
|
|
42
55
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
57
|
+
* It can't be greater than the total number of columns of the container (12).
|
|
58
|
+
* If 'auto', the grid item's width matches its content.
|
|
59
|
+
* If it's not set, the prop is ignored.
|
|
60
|
+
* The value is applied for the sm breakpoint and wider screens if not overridden.
|
|
61
|
+
*/
|
|
62
|
+
sm?: GridValues;
|
|
46
63
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
64
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
65
|
+
* It can't be greater than the total number of columns of the container (12).
|
|
66
|
+
* If 'auto', the grid item's width matches its content.
|
|
67
|
+
* If it's not set, the prop is ignored.
|
|
68
|
+
* The value is applied for the md breakpoint and wider screens if not overridden.
|
|
69
|
+
*/
|
|
70
|
+
md?: GridValues;
|
|
50
71
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
73
|
+
* It can't be greater than the total number of columns of the container (12).
|
|
74
|
+
* If 'auto', the grid item's width matches its content.
|
|
75
|
+
* If it's not set, the prop is ignored.
|
|
76
|
+
* The value is applied for the lg breakpoint and wider screens if not overridden.
|
|
77
|
+
*/
|
|
78
|
+
lg?: GridValues;
|
|
79
|
+
/**
|
|
80
|
+
* If a number, it sets the number of columns the grid item uses.
|
|
81
|
+
* It can't be greater than the total number of columns of the container (12).
|
|
82
|
+
* If 'auto', the grid item's width matches its content.
|
|
83
|
+
* If it's not set, the prop is ignored.
|
|
84
|
+
* The value is applied for the xl breakpoint and wider screens.
|
|
85
|
+
*/
|
|
86
|
+
xl?: GridValues;
|
|
54
87
|
}
|
|
55
88
|
/**
|
|
56
89
|
* Grid is used to arrange other components in complex grid configurations of rows and columns.
|
|
@@ -80,7 +113,17 @@ export const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(
|
|
|
80
113
|
className={clsx(className, {
|
|
81
114
|
'govgr-grid': container,
|
|
82
115
|
'govgr-grid-inline': container && inline,
|
|
83
|
-
[`govgr-gap-${spacing}`]: container &&
|
|
116
|
+
[`govgr-gap-${spacing}`]: container && typeof spacing === 'number',
|
|
117
|
+
[`govgr-gap-xs-${(spacing as SpacingMediaValues)?.xs}`]:
|
|
118
|
+
container && (spacing as SpacingMediaValues)?.xs !== undefined,
|
|
119
|
+
[`govgr-gap-sm-${(spacing as SpacingMediaValues)?.sm}`]:
|
|
120
|
+
container && (spacing as SpacingMediaValues)?.sm !== undefined,
|
|
121
|
+
[`govgr-gap-md-${(spacing as SpacingMediaValues)?.md}`]:
|
|
122
|
+
container && (spacing as SpacingMediaValues)?.md !== undefined,
|
|
123
|
+
[`govgr-gap-lg-${(spacing as SpacingMediaValues)?.lg}`]:
|
|
124
|
+
container && (spacing as SpacingMediaValues)?.lg !== undefined,
|
|
125
|
+
[`govgr-gap-xl-${(spacing as SpacingMediaValues)?.xl}`]:
|
|
126
|
+
container && (spacing as SpacingMediaValues)?.xl !== undefined,
|
|
84
127
|
[`xs:govgr-grid__col-span-${xs}`]: item && xs !== undefined,
|
|
85
128
|
[`sm:govgr-grid__col-span-${sm}`]: item && sm !== undefined,
|
|
86
129
|
[`md:govgr-grid__col-span-${md}`]: item && md !== undefined,
|