@etsoo/materialui 1.2.70 → 1.2.72

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.
@@ -9,6 +9,7 @@ import { CommonPageProps } from "./CommonPageProps";
9
9
  export type ViewPageGridItemProps = GridProps & {
10
10
  data: React.ReactNode;
11
11
  label?: React.ReactNode;
12
+ singleRow?: ViewPageRowType;
12
13
  };
13
14
  /**
14
15
  * View page grid item
@@ -15,9 +15,17 @@ import { CommonPage } from "./CommonPage";
15
15
  */
16
16
  export function ViewPageGridItem(props) {
17
17
  // Destruct
18
- const { data, label, ...gridProps } = props;
18
+ const { data, label, singleRow, ...gridProps } = props;
19
+ // Default options
20
+ let options = {};
21
+ if (gridProps.xs == null && gridProps.md == null) {
22
+ options = getResp(singleRow !== null && singleRow !== void 0 ? singleRow : "small");
23
+ }
24
+ else if (singleRow != null) {
25
+ options = getResp(singleRow !== null && singleRow !== void 0 ? singleRow : "small");
26
+ }
19
27
  // Layout
20
- return (React.createElement(Grid, { item: true, ...gridProps },
28
+ return (React.createElement(Grid, { item: true, ...gridProps, ...options },
21
29
  label != null && (React.createElement(Typography, { variant: "caption", component: "div" },
22
30
  label,
23
31
  ":")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.70",
3
+ "version": "1.2.72",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -26,6 +26,7 @@ import { CommonPageProps } from "./CommonPageProps";
26
26
  export type ViewPageGridItemProps = GridProps & {
27
27
  data: React.ReactNode;
28
28
  label?: React.ReactNode;
29
+ singleRow?: ViewPageRowType;
29
30
  };
30
31
 
31
32
  /**
@@ -35,11 +36,19 @@ export type ViewPageGridItemProps = GridProps & {
35
36
  */
36
37
  export function ViewPageGridItem(props: ViewPageGridItemProps) {
37
38
  // Destruct
38
- const { data, label, ...gridProps } = props;
39
+ const { data, label, singleRow, ...gridProps } = props;
40
+
41
+ // Default options
42
+ let options = {};
43
+ if (gridProps.xs == null && gridProps.md == null) {
44
+ options = getResp(singleRow ?? "small");
45
+ } else if (singleRow != null) {
46
+ options = getResp(singleRow ?? "small");
47
+ }
39
48
 
40
49
  // Layout
41
50
  return (
42
- <Grid item {...gridProps}>
51
+ <Grid item {...gridProps} {...options}>
43
52
  {label != null && (
44
53
  <Typography variant="caption" component="div">
45
54
  {label}: