@applica-software-guru/react-admin 1.4.191 → 1.4.192
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/dist/components/ra-buttons/CreateInDialogButton.d.ts +2 -1
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts +2 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +4 -4
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +38 -26
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +1 -1
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-buttons/CreateInDialogButton.tsx +11 -2
- package/src/components/ra-buttons/EditInDialogButton.tsx +7 -2
package/package.json
CHANGED
|
@@ -153,6 +153,7 @@ export type CreateInDialogButtonProps = {
|
|
|
153
153
|
scrollToTop?: boolean;
|
|
154
154
|
className?: string;
|
|
155
155
|
sx?: SxProps;
|
|
156
|
+
style?: React.CSSProperties;
|
|
156
157
|
children: React.ReactElement;
|
|
157
158
|
/**
|
|
158
159
|
* If set to false, the button will always render as a regular button, regardless of the screen size.
|
|
@@ -175,6 +176,7 @@ export function CreateInDialogButton({
|
|
|
175
176
|
scrollToTop = true,
|
|
176
177
|
className,
|
|
177
178
|
sx,
|
|
179
|
+
style,
|
|
178
180
|
fab = true,
|
|
179
181
|
onSubmit,
|
|
180
182
|
onSuccess,
|
|
@@ -204,14 +206,21 @@ export function CreateInDialogButton({
|
|
|
204
206
|
<PlusCircleOutlined />
|
|
205
207
|
</StyledFab>
|
|
206
208
|
) : (
|
|
207
|
-
<Button {...props} sx={sx} label={label} onClick={handleOpen}>
|
|
209
|
+
<Button {...props} sx={sx} label={label} onClick={handleOpen} style={style}>
|
|
208
210
|
<PlusCircleOutlined />
|
|
209
211
|
</Button>
|
|
210
212
|
)}
|
|
211
213
|
<Dialog
|
|
212
214
|
open={open}
|
|
213
215
|
scroll="body"
|
|
214
|
-
sx={{
|
|
216
|
+
sx={{
|
|
217
|
+
'& .MuiToolbar-root': {
|
|
218
|
+
position: 'initial',
|
|
219
|
+
paddingLeft: 2.5,
|
|
220
|
+
paddingRight: 2.5,
|
|
221
|
+
paddingBottom: 2.5,
|
|
222
|
+
}
|
|
223
|
+
}}
|
|
215
224
|
onClose={handleClose}
|
|
216
225
|
fullWidth={fullWidth}
|
|
217
226
|
maxWidth={maxWidth}
|
|
@@ -72,12 +72,14 @@ export type EditInDialogButtonProps = {
|
|
|
72
72
|
maxWidth?: false | Breakpoint | undefined;
|
|
73
73
|
label?: string;
|
|
74
74
|
children: React.ReactElement;
|
|
75
|
+
style?: React.CSSProperties;
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
export function EditInDialogButton({
|
|
78
79
|
fullWidth = true,
|
|
79
80
|
maxWidth = 'md',
|
|
80
81
|
label = 'ra.action.edit',
|
|
82
|
+
style,
|
|
81
83
|
...props
|
|
82
84
|
}: EditInDialogButtonProps): JSX.Element {
|
|
83
85
|
const [open, setOpen] = useState(false);
|
|
@@ -88,7 +90,7 @@ export function EditInDialogButton({
|
|
|
88
90
|
|
|
89
91
|
return (
|
|
90
92
|
<>
|
|
91
|
-
<Button label={label} onClick={handleOpen}>
|
|
93
|
+
<Button label={label} onClick={handleOpen} style={style}>
|
|
92
94
|
<Edit />
|
|
93
95
|
</Button>
|
|
94
96
|
<Dialog
|
|
@@ -96,7 +98,10 @@ export function EditInDialogButton({
|
|
|
96
98
|
scroll="body"
|
|
97
99
|
sx={{
|
|
98
100
|
'& .MuiToolbar-root': {
|
|
99
|
-
position: 'initial'
|
|
101
|
+
position: 'initial',
|
|
102
|
+
paddingLeft: 2.5,
|
|
103
|
+
paddingRight: 2.5,
|
|
104
|
+
paddingBottom: 2.5,
|
|
100
105
|
}
|
|
101
106
|
}}
|
|
102
107
|
onClose={handleClose}
|