@yakad/ui 1.0.8 → 1.1.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 +1 -1
- package/src/gridItem/gridItem.js +14 -3
- package/src/gridItem/gridItem.tsx +18 -18
package/package.json
CHANGED
package/src/gridItem/gridItem.js
CHANGED
|
@@ -3,8 +3,19 @@ import { joinClassNames } from "@yakad/lib";
|
|
|
3
3
|
import styles from "./gridItem.module.css";
|
|
4
4
|
// Custom Button Element
|
|
5
5
|
function GridItem(props) {
|
|
6
|
-
const joinedClassNames = joinClassNames(
|
|
7
|
-
|
|
6
|
+
const joinedClassNames = joinClassNames(
|
|
7
|
+
props.xl ? styles["xl" + props.xl] : "",
|
|
8
|
+
props.lg ? styles["lg" + props.lg] : "",
|
|
9
|
+
props.md ? styles["md" + props.md] : "",
|
|
10
|
+
props.sm ? styles["sm" + props.md] : "",
|
|
11
|
+
props.xs ? styles["xs" + props.md] : "",
|
|
12
|
+
props.className
|
|
13
|
+
);
|
|
14
|
+
return React.createElement(
|
|
15
|
+
"div",
|
|
16
|
+
{ ...props, className: joinedClassNames },
|
|
17
|
+
props.children
|
|
18
|
+
);
|
|
8
19
|
}
|
|
9
20
|
export default GridItem;
|
|
10
|
-
//# sourceMappingURL=gridItem.js.map
|
|
21
|
+
//# sourceMappingURL=gridItem.js.map
|
|
@@ -3,30 +3,30 @@ import { joinClassNames, joinStyles } from "@yakad/lib";
|
|
|
3
3
|
import styles from "./gridItem.module.css";
|
|
4
4
|
|
|
5
5
|
interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
xs?: number;
|
|
7
|
+
sm?: number;
|
|
8
|
+
md?: number;
|
|
9
|
+
lg?: number;
|
|
10
|
+
xl?: number;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// Custom Button Element
|
|
14
14
|
function GridItem(props: GridItemProps) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const joinedClassNames = joinClassNames(
|
|
16
|
+
props.xl ? styles["xl" + props.xl] : "",
|
|
17
|
+
props.lg ? styles["lg" + props.lg] : "",
|
|
18
|
+
props.md ? styles["md" + props.md] : "",
|
|
19
|
+
props.sm ? styles["sm" + props.md] : "",
|
|
20
|
+
props.xs ? styles["xs" + props.md] : "",
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
props.className!
|
|
23
|
+
);
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
return (
|
|
26
|
+
<div {...props} className={joinedClassNames}>
|
|
27
|
+
{props.children}
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export default GridItem;
|