fix(polyfill/vendetta): pass the right Button component
This commit is contained in:
parent
5a5639c7a8
commit
8a4d5fc0f3
3 changed files with 7 additions and 6 deletions
|
|
@ -142,8 +142,8 @@ export const initVendettaObject = (): any => {
|
||||||
components: {
|
components: {
|
||||||
Forms,
|
Forms,
|
||||||
General: common.ReactNative,
|
General: common.ReactNative,
|
||||||
Alert: commonComponents.Alert,
|
Alert: commonComponents.LegacyAlert,
|
||||||
Button: commonComponents.Button,
|
Button: commonComponents.CompatButton,
|
||||||
HelpMessage: (...props: any[]) => <commonComponents.HelpMessage {...props} />,
|
HelpMessage: (...props: any[]) => <commonComponents.HelpMessage {...props} />,
|
||||||
SafeAreaView: (...props: any[]) => <commonComponents.SafeAreaView {...props} />,
|
SafeAreaView: (...props: any[]) => <commonComponents.SafeAreaView {...props} />,
|
||||||
Summary: components.Summary,
|
Summary: components.Summary,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { ButtonColors } from "@lib/utils/types";
|
import { ButtonColors } from "@lib/utils/types";
|
||||||
import { Alert, LegacyFormInput } from "@metro/common/components";
|
import { LegacyAlert, LegacyFormInput } from "@metro/common/components";
|
||||||
import { findByPropsProxy } from "@metro/utils";
|
import { findByPropsProxy } from "@metro/utils";
|
||||||
|
|
||||||
const Alerts = findByPropsProxy("openLazy", "close");
|
const Alerts = findByPropsProxy("openLazy", "close");
|
||||||
|
|
@ -30,7 +30,7 @@ export default function InputAlert({ title, confirmText, confirmColor, onConfirm
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Alert
|
<LegacyAlert
|
||||||
title={title}
|
title={title}
|
||||||
confirmText={confirmText}
|
confirmText={confirmText}
|
||||||
confirmColor={confirmColor}
|
confirmColor={confirmColor}
|
||||||
|
|
@ -54,6 +54,6 @@ export default function InputAlert({ title, confirmText, confirmColor, onConfirm
|
||||||
showBorder={true}
|
showBorder={true}
|
||||||
style={{ alignSelf: "stretch" }}
|
style={{ alignSelf: "stretch" }}
|
||||||
/>
|
/>
|
||||||
</Alert>
|
</LegacyAlert>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,10 @@ const findSingular = (prop: string) => proxyLazy(() => findExports(bySingularPro
|
||||||
const findProp = (prop: string) => proxyLazy(() => findByProps(prop)[prop]);
|
const findProp = (prop: string) => proxyLazy(() => findByProps(prop)[prop]);
|
||||||
|
|
||||||
// Discord
|
// Discord
|
||||||
export const Alert = findByDisplayNameProxy("FluxContainer(Alert)");
|
export const LegacyAlert = findByDisplayNameProxy("FluxContainer(Alert)");
|
||||||
export const CompatButton = findByPropsProxy("Looks", "Colors", "Sizes");
|
export const CompatButton = findByPropsProxy("Looks", "Colors", "Sizes");
|
||||||
export const HelpMessage = findByNameProxy("HelpMessage");
|
export const HelpMessage = findByNameProxy("HelpMessage");
|
||||||
|
|
||||||
// React Native's included SafeAreaView only adds padding on iOS.
|
// React Native's included SafeAreaView only adds padding on iOS.
|
||||||
export const SafeAreaView = proxyLazy(() => findByProps("useSafeAreaInsets").SafeAreaView);
|
export const SafeAreaView = proxyLazy(() => findByProps("useSafeAreaInsets").SafeAreaView);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue