Skip to content

Commit a6d9610

Browse files
committed
added MUITypes Props and added props to interface
1 parent 9e48c8a commit a6d9610

File tree

2 files changed

+72
-75
lines changed

2 files changed

+72
-75
lines changed

app/src/interfaces/Interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export interface MUIType {
114114
framework: string;
115115
nestable: boolean;
116116
imports: any[];
117+
props: any[];
117118
}
118119
export interface DragItem extends DragObjectWithType {
119120
newInstance: boolean;

app/src/redux/MUITypes.ts

Lines changed: 71 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,6 @@
1-
import { TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';
2-
import { ButtonProps as MuiButtonProps } from '@mui/material/Button';
3-
import { CardProps as MuiCardProps } from '@mui/material/Card';
4-
import { TypographyProps as MuiTypographyProps } from '@mui/material/Typography';
51
import { MUIType } from '../interfaces/Interfaces';
62
import { TroubleshootSharp } from '@mui/icons-material';
73

8-
interface ButtonSchema {
9-
id: number;
10-
tag: string;
11-
name: string;
12-
style: React.CSSProperties;
13-
placeHolderShort: string;
14-
placeHolderLong: string;
15-
icon: string;
16-
framework: string;
17-
nestable: boolean;
18-
props: MuiButtonProps;
19-
}
20-
interface InputSchema {
21-
id: number;
22-
tag: string;
23-
name: string;
24-
style: React.CSSProperties;
25-
placeHolderShort: string;
26-
placeHolderLong: string;
27-
icon: string;
28-
framework: string;
29-
nestable: boolean;
30-
props: MuiTextFieldProps;
31-
}
32-
interface CardSchema {
33-
id: number;
34-
tag: string;
35-
name: string;
36-
style: React.CSSProperties;
37-
placeHolderShort: string;
38-
placeHolderLong: string;
39-
icon: string;
40-
framework: string;
41-
nestable: boolean;
42-
props: MuiCardProps;
43-
}
44-
interface TypographySchema {
45-
id: number;
46-
tag: string;
47-
name: string;
48-
style: React.CSSProperties;
49-
placeHolderShort: string;
50-
placeHolderLong: string;
51-
icon: string;
52-
framework: string;
53-
nestable: boolean;
54-
props: MuiTypographyProps;
55-
}
56-
574
const MUITypes: MUIType[] = [
585
{
596
id: 11,
@@ -62,15 +9,27 @@ const MUITypes: MUIType[] = [
629
style: {},
6310
placeHolderShort: 'button',
6411
placeHolderLong: 'Material UI Button Component',
65-
icon: 'Code',
12+
icon: 'EditAttributes',
6613
framework: 'reactClassic',
6714
nestable: true,
68-
props: {
69-
variant: 'contained',
70-
color: 'primary',
71-
disabled: false,
72-
// Add other MUI ButtonProps as needed
73-
},
15+
imports: ["import Button from '@mui/material/Button'"],
16+
props: [
17+
'children',
18+
'classes',
19+
'color',
20+
'component',
21+
'disabled',
22+
'disableElevation',
23+
'disableFocusRipple',
24+
'disableRipple',
25+
'endIcon',
26+
'fullWidth',
27+
'href',
28+
'size',
29+
'startIcon',
30+
'sx',
31+
'variant'
32+
]
7433
},
7534
{
7635
id: 21,
@@ -79,14 +38,44 @@ const MUITypes: MUIType[] = [
7938
style: {},
8039
placeHolderShort: 'input',
8140
placeHolderLong: 'Material UI TextField Component',
82-
icon: 'TextFields',
41+
icon: 'Input',
8342
framework: 'reactClassic',
8443
nestable: true,
85-
props: {
86-
variant: 'outlined',
87-
fullWidth: true,
88-
// Add other MUI TextFieldProps as needed
89-
},
44+
imports: ["import Box from '@mui/material/Box'", "import TextField from '@mui/material/TextField'"],
45+
props: [
46+
'autoComplete',
47+
'autoFocus',
48+
'classes',
49+
'color',
50+
'defaultValue',
51+
'disabled',
52+
'error',
53+
'FormHelperTextProps',
54+
'fullWidth',
55+
'helperText',
56+
'id',
57+
'InputLabelProps',
58+
'inputProps',
59+
'InputProps',
60+
'inputRef',
61+
'label',
62+
'margin',
63+
'maxRows',
64+
'minRows',
65+
'multiline',
66+
'name',
67+
'onChange',
68+
'placeholder',
69+
'required',
70+
'rows',
71+
'select',
72+
'SelectProps',
73+
'size',
74+
'sx',
75+
'type',
76+
'value',
77+
'variant'
78+
]
9079
},
9180
{
9281
id: 31,
@@ -98,10 +87,8 @@ const MUITypes: MUIType[] = [
9887
icon: 'CardTravel',
9988
framework: 'reactClassic',
10089
nestable: true,
101-
props: {
102-
variant: 'outlined',
103-
// Add other MUI CardProps as needed
104-
},
90+
imports: ["import Box from '@mui/material/Box'", "import Card from '@mui/material/Card'", "import CardActions from '@mui/material/CardActions'", "import CardContent from '@mui/material/CardContent'", "import Button from '@mui/material/Button'", "import Typography from '@mui/material/Typography'"],
91+
props: ['children','classes','raised','sx']
10592
},
10693
{
10794
id: 41,
@@ -110,13 +97,22 @@ const MUITypes: MUIType[] = [
11097
style: {},
11198
placeHolderShort: 'typography',
11299
placeHolderLong: 'Material UI Typography Component',
113-
icon: 'TextFormat',
100+
icon: 'TextFields',
114101
framework: 'reactClassic',
115102
nestable: true,
116-
props: {
117-
variant: 'h6',
118-
// Add other MUI TypographyProps as needed
119-
},
103+
imports: ["import Box from '@mui/material/Box'", "import Typography from '@mui/material/Typography'"],
104+
props: [
105+
'align',
106+
'children',
107+
'classes',
108+
'component',
109+
'gutterBottom',
110+
'noWrap',
111+
'paragraph',
112+
'sx',
113+
'variant',
114+
'variantMapping'
115+
]
120116
}
121117
];
122118

0 commit comments

Comments
 (0)