@rudra-studio/rudra-layout 1.0.23 → 1.0.24
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/components/Box/index.d.ts +14 -1
- package/components/Box/index.js +18 -6
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export interface BoxProps
|
|
2
|
+
export interface BoxProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
/**
|
|
5
5
|
* The Custom Attributes Dictionary
|
|
@@ -10,6 +10,17 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
customAttributes?: Record<string, string>;
|
|
11
11
|
/** * @type|class
|
|
12
12
|
* @schema [{
|
|
13
|
+
* "key": "Display",
|
|
14
|
+
* "type": "select",
|
|
15
|
+
* "options": [
|
|
16
|
+
* {"key": "flex", "label": "Flex"},
|
|
17
|
+
* {"key": "block", "label": "Block"},
|
|
18
|
+
* {"key": "grid", "label": "Grid"},
|
|
19
|
+
* {"key": "inline-flex", "label": "Inline Flex"},
|
|
20
|
+
* {"key": "inline-block", "label": "Inline Block"},
|
|
21
|
+
* {"key": "hidden", "label": "Hidden"}
|
|
22
|
+
* ]
|
|
23
|
+
* },{
|
|
13
24
|
* "key": "Direction",
|
|
14
25
|
* "prefix": "flex",
|
|
15
26
|
* "type": "select",
|
|
@@ -59,6 +70,8 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
59
70
|
* }]
|
|
60
71
|
*/
|
|
61
72
|
className?: string;
|
|
73
|
+
style?: React.CSSProperties;
|
|
74
|
+
onClick?: (e: any) => void;
|
|
62
75
|
}
|
|
63
76
|
export declare const Box: React.FC<BoxProps>;
|
|
64
77
|
export default Box;
|
package/components/Box/index.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Box/index.tsx
|
|
4
|
-
var t = ({ children: t, customAttributes: n = {}, className: r = "",
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
var t = ({ children: t, customAttributes: n = {}, className: r = "", style: i, onClick: a, ...o }) => {
|
|
5
|
+
let s = [
|
|
6
|
+
"flex",
|
|
7
|
+
"block",
|
|
8
|
+
"grid",
|
|
9
|
+
"inline-flex",
|
|
10
|
+
"inline-block",
|
|
11
|
+
"hidden"
|
|
12
|
+
];
|
|
13
|
+
return /* @__PURE__ */ e("div", {
|
|
14
|
+
className: r.split(" ").some((e) => s.includes(e)) ? r : `flex ${r}`.trim(),
|
|
15
|
+
style: i,
|
|
16
|
+
onClick: a,
|
|
17
|
+
...n,
|
|
18
|
+
...o,
|
|
19
|
+
children: t
|
|
20
|
+
});
|
|
21
|
+
};
|
|
10
22
|
//#endregion
|
|
11
23
|
export { t as default };
|
package/package.json
CHANGED