@ndla/ui 56.0.111-alpha.0 → 56.0.112-alpha.0

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/es/Grid/Grid.js CHANGED
@@ -79,7 +79,8 @@ export const Grid = _ref => {
79
79
  columns,
80
80
  border,
81
81
  children,
82
- background = "gray"
82
+ background = "gray",
83
+ ...rest
83
84
  } = _ref;
84
85
  const amountOfColumns = children?.length === 3 ? "3" : columns;
85
86
  return /*#__PURE__*/_jsx(GridContainer, {
@@ -87,6 +88,7 @@ export const Grid = _ref => {
87
88
  border: border === "none" ? undefined : border,
88
89
  columns: amountOfColumns,
89
90
  background: background,
91
+ ...rest,
90
92
  children: children
91
93
  });
92
94
  };
@@ -5,11 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { type ReactNode } from "react";
9
- export interface GridProps {
8
+ import { type ComponentProps, type ReactNode } from "react";
9
+ export interface GridProps extends ComponentProps<"div"> {
10
10
  columns: "2" | "3" | "4" | "2x2";
11
11
  border?: "none" | "lightBlue";
12
12
  background?: "transparent" | "white" | "gray";
13
13
  children?: ReactNode[];
14
14
  }
15
- export declare const Grid: ({ columns, border, children, background }: GridProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Grid: ({ columns, border, children, background, ...rest }: GridProps) => import("react/jsx-runtime").JSX.Element;
package/lib/Grid/Grid.js CHANGED
@@ -85,7 +85,8 @@ const Grid = _ref => {
85
85
  columns,
86
86
  border,
87
87
  children,
88
- background = "gray"
88
+ background = "gray",
89
+ ...rest
89
90
  } = _ref;
90
91
  const amountOfColumns = children?.length === 3 ? "3" : columns;
91
92
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridContainer, {
@@ -93,6 +94,7 @@ const Grid = _ref => {
93
94
  border: border === "none" ? undefined : border,
94
95
  columns: amountOfColumns,
95
96
  background: background,
97
+ ...rest,
96
98
  children: children
97
99
  });
98
100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "56.0.111-alpha.0",
3
+ "version": "56.0.112-alpha.0",
4
4
  "description": "UI component library for NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "2636009581467510d1675793f45f1762065b5a81"
60
+ "gitHead": "db91aaa57493b901a25c927167614a9d1518be48"
61
61
  }
package/src/Grid/Grid.tsx CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type ReactNode } from "react";
9
+ import { type ComponentProps, type ReactNode } from "react";
10
10
  import { styled } from "@ndla/styled-system/jsx";
11
11
 
12
12
  const GridContainer = styled("div", {
@@ -63,14 +63,14 @@ const GridContainer = styled("div", {
63
63
  },
64
64
  });
65
65
 
66
- export interface GridProps {
66
+ export interface GridProps extends ComponentProps<"div"> {
67
67
  columns: "2" | "3" | "4" | "2x2";
68
68
  border?: "none" | "lightBlue";
69
69
  background?: "transparent" | "white" | "gray";
70
70
  children?: ReactNode[];
71
71
  }
72
72
 
73
- export const Grid = ({ columns, border, children, background = "gray" }: GridProps) => {
73
+ export const Grid = ({ columns, border, children, background = "gray", ...rest }: GridProps) => {
74
74
  const amountOfColumns = children?.length === 3 ? "3" : columns;
75
75
 
76
76
  return (
@@ -79,6 +79,7 @@ export const Grid = ({ columns, border, children, background = "gray" }: GridPro
79
79
  border={border === "none" ? undefined : border}
80
80
  columns={amountOfColumns}
81
81
  background={background}
82
+ {...rest}
82
83
  >
83
84
  {children}
84
85
  </GridContainer>