NativeBase
NativeBase copied to clipboard
Nested text issue on iOS platform
Description
appearance on iOS is different from android and web
CodeSandbox/Snack link
https://codesandbox.io/s/practical-night-4uq15g?file=/src/components/Example.tsx
Steps to reproduce
Execute this following code
<Text fontWeight={"bold"}>Taj Mahal</Text>
<Text>
<Text fontWeight={"bold"}>Taj Mahal</Text> is in Agra.
</Text>
<Text bold>
Taj Mahal <Text bold={false}>is in Agra.</Text>
</Text>
NativeBase Version
3.4.4
Platform
- [ ] Android
- [ ] CRA
- [X] Expo
- [X] iOS
- [ ] Next
Other Platform
No response
Additional Information
Hi, I've just created simple nested styling text. it works fine on android and web but not on ios.
![image](https://user-images.githubusercontent.com/49143398/186124301-eebf896f-9567-4862-94b3-017625eda874.png)
as you can see in the image I attached above, on iOS it looks like there is no change in the word "Taj Mahal".
Code
<Text fontWeight={"bold"}>Taj Mahal</Text>
<Text>
<Text fontWeight={"bold"}>Taj Mahal</Text> is in Agra.
</Text>
<Text bold>
Taj Mahal <Text bold={false}>is in Agra.</Text>
</Text>
native-base: 3.4.4 expo: 43.0.0 react-native: tested on 0.64.3 & 0.68.2
Hey @anazaim77, I wasn't able to reproduce the issue. Can please try using the latest version?
It's also not working for me on iOS. The nested Text elements don't show any difference in styling.
native-base: 3.4.16 expo: 46.0.10 react-native: 0.69.5
@ankit-tailor I do have this issue as well on iOS. Nested text styling such as Italics, and bold doesn't work but changing colors does.
native-base: 3.4.19 expo: 45.0.0 react-native: 0.68.2
I think I have a related issue. Setting the font on the inner Text
causes the font to not be recognised. I suspect it might be changing the font-weight to one that doesn't exist in my theme, but I can't work out the issue because I have all the major font weights specified, and some fonts don't have the same issue. The same thing happens on Android, but rather than crashing it just uses a default font.
"native-base": "3.4.25",
"react": "18.2.0",
"react-native": "0.71.2",
- Font set on outer text, no issue
- Font set on inner text, crash
- On dismissing the error, it's using a fallback font
Im having the same issue