mg-library 1.0.725 → 1.0.727
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/components.js +12 -13
- package/mg-library.rar +0 -0
- package/package.json +1 -1
package/components.js
CHANGED
|
@@ -172,17 +172,19 @@ export function MGPopover(props) {
|
|
|
172
172
|
const footer = (
|
|
173
173
|
<Box flexDirection="row" justifyContent="space-around" mt="$5" mb="$5">
|
|
174
174
|
<MGButton
|
|
175
|
-
title={mgFunctionsLib.i18nString(
|
|
175
|
+
title={mgFunctionsLib.i18nString('yes', props.language)}
|
|
176
176
|
action="primary"
|
|
177
177
|
variant="solid"
|
|
178
|
-
py="$4"
|
|
179
178
|
callback={async () => {
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
try {
|
|
180
|
+
await props.callback?.();
|
|
181
|
+
} finally {
|
|
182
|
+
setOpen(false);
|
|
183
|
+
}
|
|
182
184
|
}}
|
|
183
185
|
/>
|
|
184
186
|
<MGButton
|
|
185
|
-
title={mgFunctionsLib.i18nString(
|
|
187
|
+
title={mgFunctionsLib.i18nString('no', props.language)}
|
|
186
188
|
action="primary"
|
|
187
189
|
variant="outline"
|
|
188
190
|
py="$4"
|
|
@@ -191,18 +193,15 @@ export function MGPopover(props) {
|
|
|
191
193
|
</Box>
|
|
192
194
|
);
|
|
193
195
|
return (
|
|
194
|
-
<Popover
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
trigger={(triggerProps) => (
|
|
198
|
-
<Button {...triggerProps} action="primary" variant="solid" py="$4">
|
|
196
|
+
<Popover isOpen={open} onOpenChange={setOpen}>
|
|
197
|
+
<PopoverTrigger>
|
|
198
|
+
<Button action="primary" variant="solid" onPress={() => setOpen(true)}>
|
|
199
199
|
{props.icon ? (
|
|
200
200
|
<Icon as={MaterialCommunityIcons} name={props.icon} mr="$2" color="$white" />
|
|
201
201
|
) : null}
|
|
202
202
|
<ButtonText>{props.title}</ButtonText>
|
|
203
203
|
</Button>
|
|
204
|
-
|
|
205
|
-
>
|
|
204
|
+
</PopoverTrigger>
|
|
206
205
|
<PopoverBackdrop />
|
|
207
206
|
<PopoverContent w={300} bg="$white">
|
|
208
207
|
<PopoverArrow />
|
|
@@ -211,7 +210,7 @@ export function MGPopover(props) {
|
|
|
211
210
|
<Box alignItems="center" justifyContent="center">
|
|
212
211
|
<Icon as={MaterialCommunityIcons} name="alert-outline" size={16} color="$primary500" mb="$3" />
|
|
213
212
|
<MGText textAlign="center">
|
|
214
|
-
{mgFunctionsLib.i18nString(
|
|
213
|
+
{mgFunctionsLib.i18nString('confirm', props.language)}?
|
|
215
214
|
</MGText>
|
|
216
215
|
</Box>
|
|
217
216
|
</PopoverBody>
|
package/mg-library.rar
CHANGED
|
Binary file
|