-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get Paragraph to render #46
Comments
Thank you for levering this issue. It's super weird, the code you provide doesn't work. But the following does: import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Placeholder from 'rn-placeholder';
export default function App() {
return (
<View style={{ flex: 1 }}>
<Placeholder.Paragraph
lineNumber={3}
textSize={16}
lineSpacing={5}
color="#ff0000"
width="100%"
lastLineWidth="70%"
firstLineWidth="50%"
onReady={false}
>
<Text>Placeholder finished</Text>
</Placeholder.Paragraph>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
},
}); It seems that using an object instead of React Native stylesheet makes the job 🤔 . I need to invest some time to understand what's going on here. Is this viable / possible for you to use Thank you again for this 👍 |
You are right, using stylesheet seems to be the problem. I will use inline styling for now. Another bug which may be related to this is when using the However, If the parent If you don't user the Example:
|
Yeah , I thinks it's related, I ll check this too ! Thank you ! |
Ok so it seems the alignItems center kills the thing, remove it make it work on container on my side 😄 |
It works on my end as well when I remove alignItems center. Thank you! 👍 |
I have the same bug. After removing the StyleSheet styling the code worked. Here is the code without the StyleSheet with inline styles:
The inline styles of the view just basically where named container and created using StyleSheet. So this bug is still out there. |
I've been testing out the different components available but cannot get a
Paragraph
component to render. I have tried to copy and paste the examples without changing anything and can get all the other components to render except paragraph.The paragraph takes up more space as I increase
lineNumber
but does not render.The text was updated successfully, but these errors were encountered: