-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52481 from software-mansion-labs/@szymczak/fix-di…
…sappearing-bg
- Loading branch information
Showing
11 changed files
with
47 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import React from 'react'; | ||
import SkeletonViewContentLoader from 'react-content-loader/native'; | ||
import {StyleSheet} from 'react-native'; | ||
import type SkeletonViewContentLoaderProps from './types'; | ||
|
||
function ContentLoader(props: SkeletonViewContentLoaderProps) { | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
return <SkeletonViewContentLoader {...props} />; | ||
function ContentLoader({style, ...props}: SkeletonViewContentLoaderProps) { | ||
return ( | ||
<SkeletonViewContentLoader | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
// Using StyleSheet.flatten() because SkeletonViewContentLoader is not able to handle array style notation(eg. style={[style1, style2]}) of style prop | ||
style={StyleSheet.flatten(style)} | ||
/> | ||
); | ||
} | ||
|
||
export default ContentLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
import React from 'react'; | ||
// eslint-disable-next-line no-restricted-imports | ||
import type {CSSProperties} from 'react'; | ||
import SkeletonViewContentLoader from 'react-content-loader'; | ||
import {StyleSheet} from 'react-native'; | ||
import type SkeletonViewContentLoaderProps from './types'; | ||
|
||
function ContentLoader(props: SkeletonViewContentLoaderProps) { | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
return <SkeletonViewContentLoader {...props} />; | ||
function ContentLoader({style, ...props}: SkeletonViewContentLoaderProps) { | ||
return ( | ||
<SkeletonViewContentLoader | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
// Using StyleSheet.flatten() because SkeletonViewContentLoader is not able to handle array style notation(eg. style={[style1, style2]}) of style prop | ||
style={StyleSheet.flatten(style) as CSSProperties} | ||
/> | ||
); | ||
} | ||
|
||
export default ContentLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import type {IContentLoaderProps} from 'react-content-loader'; | ||
import type {IContentLoaderProps as NativeIContentLoaderProps} from 'react-content-loader/native'; | ||
|
||
type SkeletonViewContentLoaderProps = IContentLoaderProps & NativeIContentLoaderProps; | ||
type SkeletonViewContentLoaderProps = Omit<IContentLoaderProps, 'style'> & NativeIContentLoaderProps; | ||
|
||
export default SkeletonViewContentLoaderProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters