Skip to content

Commit acfb036

Browse files
committed
Allow views inside text (supported since react-native v.063)
1 parent 7ddc366 commit acfb036

File tree

3 files changed

+2
-77
lines changed

3 files changed

+2
-77
lines changed

src/components/BlockLink.js

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ import Paragraph from './components/type/Paragraph';
9292

9393
/* primitive components */
9494
import Image from './components/Image';
95-
import BlockLink from './components/BlockLink';
9695
import Link from './components/Link';
9796
import Text from './components/Text';
9897
import View from './components/View';
@@ -134,7 +133,6 @@ export {
134133
Tooltip,
135134
// content
136135
Image,
137-
BlockLink,
138136
Link,
139137
Table,
140138
TD,

src/utils/rnw-compat/BaseView.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const styles = StyleSheet.create({
4646
},
4747
});
4848

49-
const calculateHitSlopStyle = hitSlop => {
49+
const calculateHitSlopStyle = (hitSlop) => {
5050
const hitStyle = {};
5151

5252
// eslint-disable-next-line no-restricted-syntax
@@ -81,17 +81,12 @@ class BaseView extends Component {
8181
checkUtilityClasses(styleName);
8282
}
8383

84-
warning(
85-
!isInAParentText,
86-
'A view should not be used inside of a text component.',
87-
);
88-
8984
warning(
9085
customClassName == null,
9186
'Using the "className" prop on <View> is deprecated.',
9287
);
9388

94-
React.Children.toArray(children).forEach(item => {
89+
React.Children.toArray(children).forEach((item) => {
9590
invariant(
9691
typeof item !== 'string',
9792
`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`,

0 commit comments

Comments
 (0)