-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #537 from jpudysz/feature/rtc
feat: add support for raw RTCView and RCTText
- Loading branch information
Showing
11 changed files
with
103 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"main": "../../../lib/commonjs/components/native/NativeText.js", | ||
"module": "../../../lib/module/components/native/NativeText.js", | ||
"react-native": "../../../src/components/native/NativeText.native.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,5 @@ | ||
{ | ||
"main": "../../../lib/commonjs/components/native/NativeView.js", | ||
"module": "../../../lib/module/components/native/NativeView.js", | ||
"react-native": "../../../src/components/native/NativeView.native.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
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,12 @@ | ||
import type { TextProps } from 'react-native' | ||
import { type ComponentType, createElement, forwardRef } from 'react' | ||
import { createUnistylesElement } from '../../core' | ||
|
||
// credits to @hirbod | ||
const LeanText = forwardRef((props, ref) => { | ||
return createElement('RCTText', { ...props, ref }) | ||
}) as ComponentType<TextProps> | ||
|
||
LeanText.displayName = 'RCTText' | ||
|
||
export const NativeText = createUnistylesElement(LeanText) |
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 @@ | ||
export { Text } from './Text' |
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,13 @@ | ||
import type { ViewProps } from 'react-native' | ||
import { type ComponentType, createElement, forwardRef } from 'react' | ||
import { createUnistylesElement } from '../../core' | ||
|
||
// credits to @hirbod | ||
const LeanView = forwardRef((props, ref) => { | ||
return createElement('RCTView', { ...props, ref }) | ||
}) as ComponentType<ViewProps> | ||
|
||
LeanView.displayName = 'RCTView' | ||
|
||
// this will match default export from react-native | ||
export default createUnistylesElement(LeanView) |
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 { View } from './View' | ||
|
||
export default View |