@tamagui/text 1.0.1-beta.99 → 1.0.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Headings.js +1 -0
- package/dist/cjs/Headings.js.map +1 -1
- package/dist/cjs/Paragraph.js +1 -0
- package/dist/cjs/Paragraph.js.map +1 -1
- package/dist/cjs/SizableText.js +3 -3
- package/dist/cjs/SizableText.js.map +2 -2
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types.js +17 -0
- package/dist/cjs/types.js.map +7 -0
- package/dist/cjs/wrapChildrenInText.js +35 -44
- package/dist/cjs/wrapChildrenInText.js.map +3 -3
- package/dist/cjs/wrapChildrenInText.test.js +3 -17
- package/dist/cjs/wrapChildrenInText.test.js.map +1 -1
- package/dist/esm/Headings.js +0 -0
- package/dist/esm/Headings.js.map +1 -1
- package/dist/esm/Paragraph.js +0 -0
- package/dist/esm/Paragraph.js.map +1 -1
- package/dist/esm/SizableText.js +3 -4
- package/dist/esm/SizableText.js.map +2 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/types.js +1 -0
- package/dist/{cjs/Texts.js.map → esm/types.js.map} +0 -0
- package/dist/esm/wrapChildrenInText.js +30 -45
- package/dist/esm/wrapChildrenInText.js.map +2 -2
- package/dist/esm/wrapChildrenInText.test.js +2 -2
- package/dist/esm/wrapChildrenInText.test.js.map +1 -1
- package/dist/jsx/Headings.js +0 -0
- package/dist/jsx/Headings.js.map +1 -1
- package/dist/jsx/Paragraph.js +0 -0
- package/dist/jsx/Paragraph.js.map +1 -1
- package/dist/jsx/SizableText.js +3 -4
- package/dist/jsx/SizableText.js.map +2 -2
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/index.js.map +2 -2
- package/dist/jsx/types.js +1 -0
- package/dist/{esm/Texts.js.map → jsx/types.js.map} +0 -0
- package/dist/jsx/wrapChildrenInText.js +25 -22
- package/dist/jsx/wrapChildrenInText.js.map +2 -2
- package/dist/jsx/wrapChildrenInText.test.js +0 -0
- package/dist/jsx/wrapChildrenInText.test.js.map +1 -1
- package/package.json +13 -10
- package/src/SizableText.tsx +11 -16
- package/src/index.tsx +1 -0
- package/src/types.ts +13 -0
- package/src/wrapChildrenInText.tsx +16 -28
- package/types/Headings.d.ts +689 -447
- package/types/Paragraph.d.ts +17 -15
- package/types/SizableText.d.ts +8 -8
- package/types/index.d.ts +1 -0
- package/types/types.d.ts +12 -0
- package/types/wrapChildrenInText.d.ts +2 -12
- package/types/wrapChildrenInText.test.d.ts +0 -0
- package/dist/cjs/Texts.js +0 -1
- package/dist/esm/Texts.js +0 -1
- package/dist/jsx/Texts.js +0 -1
- package/dist/jsx/Texts.js.map +0 -7
- package/src/Texts.tsx +0 -0
- package/types/Headings.d.ts.map +0 -1
- package/types/Paragraph.d.ts.map +0 -1
- package/types/SizableText.d.ts.map +0 -1
- package/types/Texts.d.ts +0 -1
- package/types/Texts.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/wrapChildrenInText.d.ts.map +0 -1
- package/types/wrapChildrenInText.test.d.ts.map +0 -1
package/dist/jsx/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export * from './SizableText'\nexport * from './Paragraph'\nexport * from './Headings'\nexport * from './wrapChildrenInText'\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
4
|
+
"sourcesContent": ["export * from './SizableText'\nexport * from './Paragraph'\nexport * from './Headings'\nexport * from './wrapChildrenInText'\nexport * from './types'\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
File without changes
|
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
function wrapChildrenInText(TextComponent, {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
function wrapChildrenInText(TextComponent, propsIn) {
|
|
3
|
+
const {
|
|
4
|
+
children,
|
|
5
|
+
textProps,
|
|
6
|
+
size,
|
|
7
|
+
noTextWrap,
|
|
8
|
+
color,
|
|
9
|
+
fontFamily,
|
|
10
|
+
fontSize,
|
|
11
|
+
fontWeight,
|
|
12
|
+
letterSpacing,
|
|
13
|
+
textAlign
|
|
14
|
+
} = propsIn;
|
|
14
15
|
if (noTextWrap || !children) {
|
|
15
16
|
return children;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
const allChildren = React.Children.toArray(children);
|
|
19
|
+
const nextChildren = [];
|
|
19
20
|
let lastIsString = false;
|
|
20
|
-
const
|
|
21
|
+
const props = {};
|
|
21
22
|
if (color)
|
|
22
|
-
|
|
23
|
+
props.color = color;
|
|
23
24
|
if (fontFamily)
|
|
24
|
-
|
|
25
|
+
props.fontFamily = fontFamily;
|
|
25
26
|
if (fontSize)
|
|
26
|
-
|
|
27
|
+
props.fontSize = fontSize;
|
|
27
28
|
if (fontWeight)
|
|
28
|
-
|
|
29
|
+
props.fontWeight = fontWeight;
|
|
29
30
|
if (letterSpacing)
|
|
30
|
-
|
|
31
|
+
props.letterSpacing = letterSpacing;
|
|
31
32
|
if (textAlign)
|
|
32
|
-
|
|
33
|
+
props.textAlign = textAlign;
|
|
34
|
+
if (size)
|
|
35
|
+
props.size = size;
|
|
33
36
|
function concatStringChildren() {
|
|
34
37
|
if (!lastIsString)
|
|
35
38
|
return;
|
|
36
39
|
const index = nextChildren.length - 1;
|
|
37
40
|
const childrenStrings = nextChildren[index];
|
|
38
|
-
nextChildren[index] = <TextComponent key={index} {...
|
|
41
|
+
nextChildren[index] = <TextComponent key={index} {...props} {...textProps}>{childrenStrings}</TextComponent>;
|
|
39
42
|
}
|
|
40
43
|
for (const child of allChildren) {
|
|
41
44
|
const last = nextChildren[nextChildren.length - 1];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/wrapChildrenInText.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { SizeTokens } from '@tamagui/core'\nimport React from 'react'\n\nimport {
|
|
5
|
-
"mappings": "AACA;
|
|
4
|
+
"sourcesContent": ["import type { SizeTokens } from '@tamagui/core'\nimport React from 'react'\n\nimport { TextParentStyles } from './types'\n\ntype Props = TextParentStyles & {\n children?: React.ReactNode\n size?: SizeTokens\n}\n\nexport function wrapChildrenInText(TextComponent: any, propsIn: Props) {\n const {\n children,\n textProps,\n size,\n noTextWrap,\n color,\n fontFamily,\n fontSize,\n fontWeight,\n letterSpacing,\n textAlign,\n } = propsIn\n\n if (noTextWrap || !children) {\n return children\n }\n\n // in the case of using variables, like so:\n // <ListItem>Hello, {name}</ListItem>\n // it gives us props.children as ['Hello, ', 'name']\n // but we don't want to wrap multiple SizableText around each part\n // so we group them\n const allChildren = React.Children.toArray(children)\n const nextChildren: any[] = []\n let lastIsString = false\n const props: any = {}\n // to avoid setting undefined\n if (color) props.color = color\n if (fontFamily) props.fontFamily = fontFamily\n if (fontSize) props.fontSize = fontSize\n if (fontWeight) props.fontWeight = fontWeight\n if (letterSpacing) props.letterSpacing = letterSpacing\n if (textAlign) props.textAlign = textAlign\n if (size) props.size = size\n\n function concatStringChildren() {\n if (!lastIsString) return\n const index = nextChildren.length - 1\n const childrenStrings = nextChildren[index]\n nextChildren[index] = (\n <TextComponent key={index} {...props} {...textProps}>\n {childrenStrings}\n </TextComponent>\n )\n }\n\n for (const child of allChildren) {\n const last = nextChildren[nextChildren.length - 1]\n const isString = typeof child === 'string'\n if (isString) {\n if (lastIsString) {\n last.push(child)\n } else {\n nextChildren.push([child])\n }\n } else {\n concatStringChildren()\n nextChildren.push(child)\n }\n lastIsString = isString\n }\n concatStringChildren()\n\n return nextChildren\n}\n"],
|
|
5
|
+
"mappings": "AACA,OAAO,WAAW;AASX,SAAS,mBAAmB,eAAoB,SAAgB;AACrE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,MAAI,cAAc,CAAC,UAAU;AAC3B,WAAO;AAAA,EACT;AAOA,QAAM,cAAc,MAAM,SAAS,QAAQ,QAAQ;AACnD,QAAM,eAAsB,CAAC;AAC7B,MAAI,eAAe;AACnB,QAAM,QAAa,CAAC;AAEpB,MAAI;AAAO,UAAM,QAAQ;AACzB,MAAI;AAAY,UAAM,aAAa;AACnC,MAAI;AAAU,UAAM,WAAW;AAC/B,MAAI;AAAY,UAAM,aAAa;AACnC,MAAI;AAAe,UAAM,gBAAgB;AACzC,MAAI;AAAW,UAAM,YAAY;AACjC,MAAI;AAAM,UAAM,OAAO;AAEvB,WAAS,uBAAuB;AAC9B,QAAI,CAAC;AAAc;AACnB,UAAM,QAAQ,aAAa,SAAS;AACpC,UAAM,kBAAkB,aAAa;AACrC,iBAAa,SACX,CAAC,cAAc,KAAK,WAAW,WAAW,YACvC,gBACH,EAFC;AAAA,EAIL;AAEA,aAAW,SAAS,aAAa;AAC/B,UAAM,OAAO,aAAa,aAAa,SAAS;AAChD,UAAM,WAAW,OAAO,UAAU;AAClC,QAAI,UAAU;AACZ,UAAI,cAAc;AAChB,aAAK,KAAK,KAAK;AAAA,MACjB,OAAO;AACL,qBAAa,KAAK,CAAC,KAAK,CAAC;AAAA,MAC3B;AAAA,IACF,OAAO;AACL,2BAAqB;AACrB,mBAAa,KAAK,KAAK;AAAA,IACzB;AACA,mBAAe;AAAA,EACjB;AACA,uBAAqB;AAErB,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
File without changes
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/wrapChildrenInText.test.tsx"],
|
|
4
4
|
"sourcesContent": ["import React from 'react'\nimport { expect, test } from 'vitest'\n\nimport { wrapChildrenInText } from './wrapChildrenInText'\n\nconst Comp = () => {}\nconst re = <div data-id={Math.random()} />\nconst reID = re.props['data-id']\n\ntest('should wrap all string children, not wrap others', () => {\n const out = wrapChildrenInText(Comp, {\n children: [re, 'a', 'b', re, 'c', re, 'd'],\n }) as any\n\n expect(out[0].props['data-id']).toBe(reID)\n\n expect(out[1].type).toBe(Comp)\n expect(out[1].props.children).toStrictEqual(['a', 'b'])\n\n expect(out[2].props['data-id']).toBe(reID)\n\n expect(out[3].type).toBe(Comp)\n expect(out[3].props.children).toStrictEqual(['c'])\n\n expect(out[4].props['data-id']).toBe(reID)\n\n expect(out[5].type).toBe(Comp)\n expect(out[5].props.children).toStrictEqual(['d'])\n})\n\ntest('should first child string', () => {\n const out = wrapChildrenInText(Comp, {\n children: ['a', re],\n }) as any\n\n expect(out[0].type).toBe(Comp)\n expect(out[0].props.children).toStrictEqual(['a'])\n\n expect(out[1].props['data-id']).toBe(reID)\n})\n"],
|
|
5
|
-
"mappings": "AACA;
|
|
5
|
+
"mappings": "AACA,SAAS,QAAQ,YAAY;AAE7B,SAAS,0BAA0B;AAEnC,MAAM,OAAO,MAAM;AAAC;AACpB,MAAM,KAAK,CAAC,IAAI,SAAS,KAAK,OAAO,GAAG;AACxC,MAAM,OAAO,GAAG,MAAM;AAEtB,KAAK,oDAAoD,MAAM;AAC7D,QAAM,MAAM,mBAAmB,MAAM;AAAA,IACnC,UAAU,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,IAAI,GAAG;AAAA,EAC3C,CAAC;AAED,SAAO,IAAI,GAAG,MAAM,UAAU,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,GAAG,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,GAAG,MAAM,QAAQ,EAAE,cAAc,CAAC,KAAK,GAAG,CAAC;AAEtD,SAAO,IAAI,GAAG,MAAM,UAAU,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,GAAG,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,GAAG,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AAEjD,SAAO,IAAI,GAAG,MAAM,UAAU,EAAE,KAAK,IAAI;AAEzC,SAAO,IAAI,GAAG,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,GAAG,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AACnD,CAAC;AAED,KAAK,6BAA6B,MAAM;AACtC,QAAM,MAAM,mBAAmB,MAAM;AAAA,IACnC,UAAU,CAAC,KAAK,EAAE;AAAA,EACpB,CAAC;AAED,SAAO,IAAI,GAAG,IAAI,EAAE,KAAK,IAAI;AAC7B,SAAO,IAAI,GAAG,MAAM,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC;AAEjD,SAAO,IAAI,GAAG,MAAM,UAAU,EAAE,KAAK,IAAI;AAC3C,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/text",
|
|
3
|
-
"version": "1.0.1-
|
|
3
|
+
"version": "1.0.1-rc.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -17,23 +17,26 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tamagui-build",
|
|
19
19
|
"watch": "tamagui-build --watch",
|
|
20
|
+
"lint": "eslint src",
|
|
21
|
+
"lint:fix": "yarn lint --fix",
|
|
20
22
|
"clean": "tamagui-build clean",
|
|
21
23
|
"clean:build": "tamagui-build clean:build",
|
|
22
|
-
"test": "vitest --config ../vite-plugin-internal/vite.config.ts"
|
|
24
|
+
"test": "vitest --config ../vite-plugin-internal/src/vite.config.ts --run"
|
|
23
25
|
},
|
|
24
26
|
"dependencies": {
|
|
25
|
-
"@tamagui/core": "^1.0.1-
|
|
27
|
+
"@tamagui/core": "^1.0.1-rc.0",
|
|
28
|
+
"@tamagui/get-font-sized": "^1.0.1-rc.0",
|
|
29
|
+
"@tamagui/helpers-tamagui": "^1.0.1-rc.0"
|
|
26
30
|
},
|
|
27
31
|
"peerDependencies": {
|
|
28
|
-
"react": "
|
|
29
|
-
"react-dom": "
|
|
32
|
+
"react": ">=18",
|
|
33
|
+
"react-dom": ">=18"
|
|
30
34
|
},
|
|
31
35
|
"devDependencies": {
|
|
32
|
-
"@tamagui/build": "^1.0.1-
|
|
33
|
-
"
|
|
34
|
-
"react": "
|
|
35
|
-
"
|
|
36
|
-
"vitest": "^0.17.1"
|
|
36
|
+
"@tamagui/build": "^1.0.1-rc.0",
|
|
37
|
+
"react": ">=18",
|
|
38
|
+
"react-dom": ">=18",
|
|
39
|
+
"vitest": "^0.25.3"
|
|
37
40
|
},
|
|
38
41
|
"publishConfig": {
|
|
39
42
|
"access": "public"
|
package/src/SizableText.tsx
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import { GetProps, Text,
|
|
1
|
+
import { GetProps, Text, styled } from '@tamagui/core'
|
|
2
|
+
import { getFontSized } from '@tamagui/get-font-sized'
|
|
2
3
|
|
|
3
|
-
export const SizableText = styled(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: 'SizableText',
|
|
7
|
-
fontFamily: '$body',
|
|
4
|
+
export const SizableText = styled(Text, {
|
|
5
|
+
name: 'SizableText',
|
|
6
|
+
fontFamily: '$body',
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
variants: {
|
|
9
|
+
size: getFontSized,
|
|
10
|
+
} as const,
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
size: '$4',
|
|
16
14
|
},
|
|
17
|
-
|
|
18
|
-
inlineWhenUnflattened: new Set(['fontFamily']),
|
|
19
|
-
}
|
|
20
|
-
)
|
|
15
|
+
})
|
|
21
16
|
|
|
22
17
|
export type SizableTextProps = GetProps<typeof SizableText>
|
package/src/index.tsx
CHANGED
package/src/types.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SizableTextProps } from './SizableText'
|
|
2
|
+
|
|
3
|
+
export type TextParentStyles = {
|
|
4
|
+
color?: SizableTextProps['color']
|
|
5
|
+
fontWeight?: SizableTextProps['fontWeight']
|
|
6
|
+
fontSize?: SizableTextProps['fontSize']
|
|
7
|
+
fontFamily?: SizableTextProps['fontFamily']
|
|
8
|
+
letterSpacing?: SizableTextProps['letterSpacing']
|
|
9
|
+
textAlign?: SizableTextProps['textAlign']
|
|
10
|
+
// all the other text controls
|
|
11
|
+
textProps?: Partial<SizableTextProps>
|
|
12
|
+
noTextWrap?: boolean
|
|
13
|
+
}
|
|
@@ -1,28 +1,15 @@
|
|
|
1
1
|
import type { SizeTokens } from '@tamagui/core'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export type TextParentStyles = {
|
|
7
|
-
color?: SizableTextProps['color']
|
|
8
|
-
fontWeight?: SizableTextProps['fontWeight']
|
|
9
|
-
fontSize?: SizableTextProps['fontSize']
|
|
10
|
-
fontFamily?: SizableTextProps['fontFamily']
|
|
11
|
-
letterSpacing?: SizableTextProps['letterSpacing']
|
|
12
|
-
textAlign?: SizableTextProps['textAlign']
|
|
13
|
-
// all the other text controls
|
|
14
|
-
textProps?: Partial<SizableTextProps>
|
|
15
|
-
noTextWrap?: boolean
|
|
16
|
-
}
|
|
4
|
+
import { TextParentStyles } from './types'
|
|
17
5
|
|
|
18
6
|
type Props = TextParentStyles & {
|
|
19
7
|
children?: React.ReactNode
|
|
20
8
|
size?: SizeTokens
|
|
21
9
|
}
|
|
22
10
|
|
|
23
|
-
export function wrapChildrenInText(
|
|
24
|
-
|
|
25
|
-
{
|
|
11
|
+
export function wrapChildrenInText(TextComponent: any, propsIn: Props) {
|
|
12
|
+
const {
|
|
26
13
|
children,
|
|
27
14
|
textProps,
|
|
28
15
|
size,
|
|
@@ -33,8 +20,8 @@ export function wrapChildrenInText(
|
|
|
33
20
|
fontWeight,
|
|
34
21
|
letterSpacing,
|
|
35
22
|
textAlign,
|
|
36
|
-
}
|
|
37
|
-
|
|
23
|
+
} = propsIn
|
|
24
|
+
|
|
38
25
|
if (noTextWrap || !children) {
|
|
39
26
|
return children
|
|
40
27
|
}
|
|
@@ -44,24 +31,25 @@ export function wrapChildrenInText(
|
|
|
44
31
|
// it gives us props.children as ['Hello, ', 'name']
|
|
45
32
|
// but we don't want to wrap multiple SizableText around each part
|
|
46
33
|
// so we group them
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
const allChildren = React.Children.toArray(children)
|
|
35
|
+
const nextChildren: any[] = []
|
|
49
36
|
let lastIsString = false
|
|
50
|
-
const
|
|
37
|
+
const props: any = {}
|
|
51
38
|
// to avoid setting undefined
|
|
52
|
-
if (color)
|
|
53
|
-
if (fontFamily)
|
|
54
|
-
if (fontSize)
|
|
55
|
-
if (fontWeight)
|
|
56
|
-
if (letterSpacing)
|
|
57
|
-
if (textAlign)
|
|
39
|
+
if (color) props.color = color
|
|
40
|
+
if (fontFamily) props.fontFamily = fontFamily
|
|
41
|
+
if (fontSize) props.fontSize = fontSize
|
|
42
|
+
if (fontWeight) props.fontWeight = fontWeight
|
|
43
|
+
if (letterSpacing) props.letterSpacing = letterSpacing
|
|
44
|
+
if (textAlign) props.textAlign = textAlign
|
|
45
|
+
if (size) props.size = size
|
|
58
46
|
|
|
59
47
|
function concatStringChildren() {
|
|
60
48
|
if (!lastIsString) return
|
|
61
49
|
const index = nextChildren.length - 1
|
|
62
50
|
const childrenStrings = nextChildren[index]
|
|
63
51
|
nextChildren[index] = (
|
|
64
|
-
<TextComponent key={index} {...
|
|
52
|
+
<TextComponent key={index} {...props} {...textProps}>
|
|
65
53
|
{childrenStrings}
|
|
66
54
|
</TextComponent>
|
|
67
55
|
)
|