diff --git a/en/react-native-popup-menu.md b/en/react-native-popup-menu.md index 787b3eb9737ad34c2b719ba1983870d7d414349b..f631ff79244a0e591690dc850e287c42512d8894 100644 --- a/en/react-native-popup-menu.md +++ b/en/react-native-popup-menu.md @@ -14,7 +14,7 @@ -> [!TIP] [GitHub address](https://github.com/instea/react-native-popup-menu) +> [!TIP] [GitHub address](https://github.com/instea/react-native-popup-menu/tree/58b78642808ab28012f429d59a2c302dc41b5924) ## Installation and Usage @@ -44,7 +44,7 @@ import { MenuProvider } from "react-native-popup-menu"; export const App = () => ( - + ); @@ -55,19 +55,23 @@ import { MenuOption, MenuTrigger, } from "react-native-popup-menu"; - +import { + Text, + View, + Alert, +} from "react-native"; export const YourComponent = () => ( Hello world! - alert(`Save`)} text="Save" /> - alert(`Delete`)}> + Alert.alert(`Save`)} text="Save" /> + Alert.alert(`Delete`)}> Delete alert(`Not called`)} + onSelect={() => Alert.alert(`Not called`)} disabled={true} text="Disabled" /> @@ -156,4 +160,4 @@ For details, see [react-native-popup-menu](https://github.com/instea/react-nativ ## License -This project is licensed under [The ISC License (ISC)](https://github.com/instea/react-native-popup-menu/blob/master/LICENSE). +This project is licensed under [The ISC License (ISC)](https://github.com/instea/react-native-popup-menu/blob/master/LICENSE). \ No newline at end of file diff --git a/zh-cn/react-native-popup-menu.md b/zh-cn/react-native-popup-menu.md index 2fb159ab13546531627604088a36952fa3b01ea0..d6052b98f6d9aba3a9d7efe65348d7db84cd4f7b 100644 --- a/zh-cn/react-native-popup-menu.md +++ b/zh-cn/react-native-popup-menu.md @@ -14,7 +14,7 @@ -> [!TIP] [Github 地址](https://github.com/instea/react-native-popup-menu) +> [!TIP] [Github 地址](https://github.com/instea/react-native-popup-menu/tree/58b78642808ab28012f429d59a2c302dc41b5924) ## 安装与使用 @@ -44,7 +44,7 @@ import { MenuProvider } from "react-native-popup-menu"; export const App = () => ( - + ); @@ -55,19 +55,23 @@ import { MenuOption, MenuTrigger, } from "react-native-popup-menu"; - +import { + Text, + View, + Alert, +} from "react-native"; export const YourComponent = () => ( Hello world! - alert(`Save`)} text="Save" /> - alert(`Delete`)}> + Alert.alert(`Save`)} text="Save" /> + Alert.alert(`Delete`)}> Delete alert(`Not called`)} + onSelect={() => Alert.alert(`Not called`)} disabled={true} text="Disabled" /> @@ -156,4 +160,4 @@ export const YourComponent = () => ( ## 开源协议 -本项目基于 [The ISC License (ISC)](https://github.com/instea/react-native-popup-menu/blob/master/LICENSE) ,请自由地享受和参与开源。 +本项目基于 [The ISC License (ISC)](https://github.com/instea/react-native-popup-menu/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file