@stackshift-ui/section 6.0.11 → 7.0.0-beta.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/package.json +4 -4
- package/src/section.test.tsx +1 -1
- package/src/section.tsx +2 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/section",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0-beta.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/scripts": "6.0.
|
|
38
|
-
"@stackshift-ui/system": "6.0.
|
|
37
|
+
"@stackshift-ui/scripts": "6.1.0-beta.0",
|
|
38
|
+
"@stackshift-ui/system": "6.1.0-beta.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@stackshift-ui/system": ">=6.0.
|
|
41
|
+
"@stackshift-ui/system": ">=6.1.0-beta.0",
|
|
42
42
|
"@types/react": "16.8 - 19",
|
|
43
43
|
"next": "10 - 14",
|
|
44
44
|
"react": "16.8 - 19",
|
package/src/section.test.tsx
CHANGED
|
@@ -7,7 +7,7 @@ describe.concurrent("section", () => {
|
|
|
7
7
|
|
|
8
8
|
test("Layout: Section - test if renders without errors", ({ expect }) => {
|
|
9
9
|
const clx = "section-class";
|
|
10
|
-
render(<Section className={clx} />);
|
|
10
|
+
render(<Section data-testid="div" className={clx} />);
|
|
11
11
|
expect(screen.getByTestId("div").classList).toContain(clx);
|
|
12
12
|
});
|
|
13
13
|
});
|
package/src/section.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
2
|
-
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
3
2
|
import cn from "classnames";
|
|
3
|
+
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
type Width = "sm" | "md" | "lg" | "xl" | "2xl" | "full" | number;
|
|
6
6
|
|
|
@@ -39,12 +39,7 @@ export const Section: React.FC<SectionProps> = ({
|
|
|
39
39
|
const classes = "mx-auto w-full px-4";
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
<Component
|
|
43
|
-
as={as}
|
|
44
|
-
className={cn(classes, className)}
|
|
45
|
-
style={{ maxWidth: width }}
|
|
46
|
-
{...props}
|
|
47
|
-
data-testid={displayName}>
|
|
42
|
+
<Component as={as} className={cn(classes, className)} style={{ maxWidth: width }} {...props}>
|
|
48
43
|
{children}
|
|
49
44
|
</Component>
|
|
50
45
|
);
|