-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine native and native-view into native-common
- Loading branch information
1 parent
f542741
commit e4ad75b
Showing
12 changed files
with
29 additions
and
382 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
packages/create-react-native-library/templates/native-common/src/index.tsx
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,24 @@ | ||
<% if (project.moduleType === "view") { -%> | ||
import { requireNativeComponent, ViewStyle } from 'react-native'; | ||
|
||
type <%- project.name %>Props = { | ||
color: string; | ||
style: ViewStyle; | ||
}; | ||
|
||
export const <%- project.name %>ViewManager = requireNativeComponent<<%- project.name %>Props>( | ||
'<%- project.name %>View' | ||
); | ||
|
||
export default <%- project.name %>ViewManager; | ||
<% } else { -%> | ||
import { NativeModules } from 'react-native'; | ||
|
||
type <%- project.name %>Type = { | ||
multiply(a: number, b: number): Promise<number>; | ||
}; | ||
|
||
const { <%- project.name %> } = NativeModules; | ||
|
||
export default <%- project.name %> as <%- project.name %>Type; | ||
<% } -%> |
File renamed without changes.
9 changes: 0 additions & 9 deletions
9
packages/create-react-native-library/templates/native-library/src/index.tsx
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...e-react-native-library/templates/native-view-library/android/src/main/AndroidManifest.xml
This file was deleted.
Oops, something went wrong.
317 changes: 0 additions & 317 deletions
317
...e-library/templates/native-view-library/ios/{%- project.name %}.xcodeproj/project.pbxproj
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...ew-library/ios/{%- project.name %}.xcodeproj/project.xcworkspace/contents.xcworkspacedata
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.