We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using style prop, style can be an array as below.
const padding = { padding: 2}; const bigHeight = { height: 50}; const normalHeight = { height: 20}; const longWidth = { width: 200 }; const termWidth = { width: 70 }; const margin= { margin: 8 }; ... <SkeletonPlaceHolder > <View style={[padding, bigHeight, normalWidth, margin]} /> <View style={[normalHeight, longWidth]} /> <View style={[normalHeight, longWidth]} /> <View style={[padding, bigHeight, longWidth, margin]} /> </SkeletonPlaceHolder>
In this case,
react-native-skeleton-placeholder/src/skeleton-placeholder.tsx
Lines 185 to 188 in 3c0ebcf
So, I suggest like below.
const style = element.type?.displayName === SkeletonPlaceholder.Item.displayName ? getItemStyle(element.props) : Array.isArray(element.props.style) ? element.props.style.reduce((flattenStyle, value)=>({...flattenStyle, ...value}), {}) : element.props.style;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When using style prop, style can be an array as below.
In this case,
react-native-skeleton-placeholder/src/skeleton-placeholder.tsx
Lines 185 to 188 in 3c0ebcf
So, I suggest like below.
The text was updated successfully, but these errors were encountered: