Skip to content

Commit 350d6c5

Browse files
committed
fix: mobile compiles well
1 parent 6efd35f commit 350d6c5

File tree

7 files changed

+37
-7
lines changed

7 files changed

+37
-7
lines changed

demo/mobile/reactnative/package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/mobile/reactnative/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"nanoid": "^3.1.29",
1616
"react": "17.0.2",
1717
"react-native": "0.65.1",
18+
"react-native-select-dropdown": "^1.2.0",
1819
"react-native-vector-icons": "8.1.0",
1920
"xstate": "^4.25.0"
2021
},

scripts/installer/frameworks/react-native/src/ui-framework/types/rnpaper-framework.type.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export interface UIFramework {
7171
ValidationMessages: any;
7272
};
7373
wrapperComponents: {
74+
InputLabel: Function;
75+
FormLabel: Function;
7476
AppBar: Function;
7577
Tabs: Function;
7678
Tab: Function;

scripts/installer/frameworks/react/src/ui-framework/mui.framework.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import EmptyDiv from '@mui/material/Divider';
1616
import FormControl from '@mui/material/FormControl';
1717
import FormGroup from '@mui/material/FormGroup';
1818
import FormHelperText from '@mui/material/FormHelperText';
19+
import FormLabel from '@mui/material/FormLabel';
20+
import InputLabel from '@mui/material/InputLabel';
1921

2022
// MUI
2123
import Typography from '@mui/material/Typography';
@@ -55,6 +57,8 @@ export const uiFramework: UIFramework = {
5557
ValidationMessages,
5658
},
5759
wrapperComponents: {
60+
FormLabel,
61+
InputLabel,
5862
AppBar,
5963
Tabs,
6064
Tab,

scripts/installer/frameworks/react/src/ui-framework/types/mui-framework.type.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export interface UIFramework {
7171
ValidationMessages: any;
7272
};
7373
wrapperComponents: {
74+
InputLabel: Function;
75+
FormLabel: Function;
7476
AppBar: Function;
7577
Tabs: Function;
7678
Tab: Function;

src/cross-framework-wrapper/react/FieldSet/variants/fieldset-array/field-array.variants.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
import React from 'react';
33
import slice from 'lodash/slice';
44

5-
// Material UI
6-
import IconButton from '@mui/material/IconButton';
7-
import AddCircle from '@mui/icons-material/AddCircle';
5+
// UI
6+
import Framework from '@universal-schema/framework';
87

98
// Helpers
109
import getDefaultValue from '@helpers/get-default-value';
@@ -16,6 +15,13 @@ import FIELDSET_CONFIG, { ArrayVariants, ArrayWrapperVariants } from '@config/fi
1615
import FormField from '../../../FormField';
1716
import ReorderableFormField from '../../ReorderableFormField';
1817

18+
const {
19+
wrapperComponents: {
20+
IconButton,
21+
AddCircle
22+
}
23+
} = Framework.uiFramework;
24+
1925
const { ARRAY_VARIANTS } = FIELDSET_CONFIG;
2026

2127
export type AllowedVariants = {

src/cross-framework-wrapper/react/fields/configure/label/get-label-component.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
// import Input, { InputLabel } from '@mui/material/Input'; // eslint-disable-line import/no-named-default
2-
import FormLabel from '@mui/material/FormLabel';
1+
// UI
2+
import Framework from '@universal-schema/framework';
3+
const {
4+
wrapperComponents: {
5+
FormLabel,
6+
InputLabel,
7+
},
8+
} = Framework.uiFramework;
39
import { isEnum } from '@react-jsonschema-form-utils/enum-utils';
410

5-
const InputLabel = require('@mui/material/InputLabel').default;
6-
711
export default ({ schema, uiSchema = {} }) => {
812
const widget = uiSchema['ui:widget'];
913
const options = uiSchema['ui:options'] || uiSchema['ui:props'];

0 commit comments

Comments
 (0)