-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a314a5
commit d85b9de
Showing
6 changed files
with
18 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Button } from 'react-native-paper'; | ||
|
||
export { Button }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,3 @@ | ||
import { NativeModules, Platform } from 'react-native'; | ||
import { Button } from './components'; | ||
|
||
const LINKING_ERROR = | ||
`The package 'smartway-react-native-ui' doesn't seem to be linked. Make sure: \n\n` + | ||
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + | ||
'- You rebuilt the app after installing the package\n' + | ||
'- You are not using Expo Go\n'; | ||
|
||
const SmartwayReactNativeUi = NativeModules.SmartwayReactNativeUi | ||
? NativeModules.SmartwayReactNativeUi | ||
: new Proxy( | ||
{}, | ||
{ | ||
get() { | ||
throw new Error(LINKING_ERROR); | ||
}, | ||
} | ||
); | ||
|
||
export function multiply(a: number, b: number): Promise<number> { | ||
return SmartwayReactNativeUi.multiply(a, b); | ||
} | ||
export { Button }; |