Project initialization (npx create-react-native-library)

This commit is contained in:
Tiago Jacobs
2022-02-14 16:11:21 -03:00
parent 1164027645
commit 9502d53fe3
77 changed files with 17889 additions and 0 deletions

View File

@@ -0,0 +1 @@
it.todo('write a test');

26
src/index.tsx Normal file
View File

@@ -0,0 +1,26 @@
import {
requireNativeComponent,
UIManager,
Platform,
ViewStyle,
} from 'react-native';
const LINKING_ERROR =
`The package 'bigbluebutton-mobile-sdk' 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 managed workflow\n';
type BigbluebuttonMobileSdkProps = {
color: string;
style: ViewStyle;
};
const ComponentName = 'BigbluebuttonMobileSdkView';
export const BigbluebuttonMobileSdkView =
UIManager.getViewManagerConfig(ComponentName) != null
? requireNativeComponent<BigbluebuttonMobileSdkProps>(ComponentName)
: () => {
throw new Error(LINKING_ERROR);
};