| ... | @@ -19,24 +19,33 @@ import { AndroidAnchoredMenu } from "./AndroidAnchoredMenu"; | ... | @@ -19,24 +19,33 @@ import { AndroidAnchoredMenu } from "./AndroidAnchoredMenu"; |
| 19 | import { SymbolView } from "./AppSymbol"; | 19 | import { SymbolView } from "./AppSymbol"; |
| 20 | import { AppText as Text } from "./AppText"; | 20 | import { AppText as Text } from "./AppText"; |
| 21 | | 21 | |
| 22 | const ThemedMenuView = withUniwind(function NativeMenuView({ | 22 | const ThemedMenuView = withUniwind( |
| 23 | iconColor, | 23 | function NativeMenuView({ |
| 24 | destructiveIconColor, | 24 | iconColor, |
| 25 | ...props | 25 | destructiveIconColor, |
| 26 | }: ComponentProps<typeof MenuView> & { | 26 | ...props |
| 27 | readonly iconColor?: ColorValue; | 27 | }: ComponentProps<typeof MenuView> & { |
| 28 | readonly destructiveIconColor?: ColorValue; | 28 | readonly iconColor?: ColorValue; |
| 29 | }) { | 29 | readonly destructiveIconColor?: ColorValue; |
| 30 | const actions = useMemo( | 30 | }) { |
| 31 | () => | 31 | const actions = useMemo( |
| 32 | withMenuActionIconColors(props.actions, { | 32 | () => |
| 33 | icon: iconColor, | 33 | withMenuActionIconColors(props.actions, { |
| 34 | destructiveIcon: destructiveIconColor, | 34 | icon: iconColor, |
| 35 | }), | 35 | destructiveIcon: destructiveIconColor, |
| 36 | [props.actions, iconColor, destructiveIconColor], | 36 | }), |
| 37 | ); | 37 | [props.actions, iconColor, destructiveIconColor], |
| 38 | return <MenuView {...props} actions={actions} />; | 38 | ); |
| 39 | }); | 39 | return <MenuView {...props} actions={actions} />; |
| | 40 | }, |
| | 41 | { |
| | 42 | iconColor: { fromClassName: "iconColorClassName", styleProperty: "accentColor" }, |
| | 43 | destructiveIconColor: { |
| | 44 | fromClassName: "destructiveIconColorClassName", |
| | 45 | styleProperty: "accentColor", |
| | 46 | }, |
| | 47 | }, |
| | 48 | ); |
| 40 | | 49 | |
| 41 | export function ControlPill(props: { | 50 | export function ControlPill(props: { |
| 42 | readonly icon?: ComponentProps<typeof SymbolView>["name"]; | 51 | readonly icon?: ComponentProps<typeof SymbolView>["name"]; |