-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ability to define
poster
props as Image type and render p…
…oster as custom component (#3972)
- Loading branch information
1 parent
1ee5811
commit adbd06e
Showing
10 changed files
with
184 additions
and
72 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
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,22 +1,8 @@ | ||
import React, {FC, memo} from 'react'; | ||
import {ActivityIndicator, View} from 'react-native'; | ||
import styles from '../styles.tsx'; | ||
import React, {memo} from 'react'; | ||
import {ActivityIndicator} from 'react-native'; | ||
|
||
type Props = { | ||
isLoading: boolean; | ||
}; | ||
|
||
const _Indicator: FC<Props> = ({isLoading}) => { | ||
if (!isLoading) { | ||
return <View />; | ||
} | ||
return ( | ||
<ActivityIndicator | ||
color="#3235fd" | ||
size="large" | ||
style={styles.IndicatorStyle} | ||
/> | ||
); | ||
const _Indicator = () => { | ||
return <ActivityIndicator color="#3235fd" size="large" />; | ||
}; | ||
|
||
export const Indicator = memo(_Indicator); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {Text, View} from 'react-native'; | ||
import {Indicator} from './Indicator.tsx'; | ||
import React, {memo} from 'react'; | ||
import styles from '../styles.tsx'; | ||
|
||
const _VideoLoader = () => { | ||
return ( | ||
<View style={styles.indicatorContainer}> | ||
<Text style={styles.indicatorText}>Loading...</Text> | ||
<Indicator /> | ||
</View> | ||
); | ||
}; | ||
|
||
export const VideoLoader = memo(_VideoLoader); |
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
Oops, something went wrong.