fix(mobile): map native menu icon colors explicitly
This commit is contained in:
1 parent
e3dcc1615c
commit
f9137a0c89
1 file changed
+27
-18
@@ -19,24 +19,33 @@ import { AndroidAnchoredMenu } from "./AndroidAnchoredMenu";
|
||||
import { SymbolView } from "./AppSymbol";
|
||||
import { AppText as Text } from "./AppText";
|
||||
|
||||
const ThemedMenuView = withUniwind(function NativeMenuView({
|
||||
iconColor,
|
||||
destructiveIconColor,
|
||||
...props
|
||||
}: ComponentProps<typeof MenuView> & {
|
||||
readonly iconColor?: ColorValue;
|
||||
readonly destructiveIconColor?: ColorValue;
|
||||
}) {
|
||||
const actions = useMemo(
|
||||
() =>
|
||||
withMenuActionIconColors(props.actions, {
|
||||
icon: iconColor,
|
||||
destructiveIcon: destructiveIconColor,
|
||||
}),
|
||||
[props.actions, iconColor, destructiveIconColor],
|
||||
);
|
||||
return <MenuView {...props} actions={actions} />;
|
||||
});
|
||||
const ThemedMenuView = withUniwind(
|
||||
function NativeMenuView({
|
||||
iconColor,
|
||||
destructiveIconColor,
|
||||
...props
|
||||
}: ComponentProps<typeof MenuView> & {
|
||||
readonly iconColor?: ColorValue;
|
||||
readonly destructiveIconColor?: ColorValue;
|
||||
}) {
|
||||
const actions = useMemo(
|
||||
() =>
|
||||
withMenuActionIconColors(props.actions, {
|
||||
icon: iconColor,
|
||||
destructiveIcon: destructiveIconColor,
|
||||
}),
|
||||
[props.actions, iconColor, destructiveIconColor],
|
||||
);
|
||||
return <MenuView {...props} actions={actions} />;
|
||||
},
|
||||
{
|
||||
iconColor: { fromClassName: "iconColorClassName", styleProperty: "accentColor" },
|
||||
destructiveIconColor: {
|
||||
fromClassName: "destructiveIconColorClassName",
|
||||
styleProperty: "accentColor",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
export function ControlPill(props: {
|
||||
readonly icon?: ComponentProps<typeof SymbolView>["name"];
|
||||
|
||||
Reference in new issue
Block a user