-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: wip * refactor: image processing screen * refactor: rename to NativeImage
- Loading branch information
Showing
8 changed files
with
77 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { StyleSheet, Text, View, type ColorValue } from 'react-native'; | ||
import React from 'react'; | ||
import TurboImage, { type CachePolicy } from 'react-native-turbo-image'; | ||
|
||
type Props = { | ||
size: number; | ||
title?: string; | ||
url: string; | ||
cachePolicy?: CachePolicy; | ||
priority?: number; | ||
rounded?: boolean; | ||
monochrome?: number | ColorValue; | ||
borderRadius?: number; | ||
blur?: number; | ||
}; | ||
const Card = ({ title, size, ...props }: Props) => { | ||
return ( | ||
<View style={styles.card}> | ||
<TurboImage | ||
style={[styles.image, { width: size, height: size }]} | ||
{...props} | ||
/> | ||
{title && <Text style={styles.title}>{title}</Text>} | ||
</View> | ||
); | ||
}; | ||
|
||
export default Card; | ||
|
||
const styles = StyleSheet.create({ | ||
card: { | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
paddingBottom: 20, | ||
}, | ||
image: { | ||
margin: 1, | ||
}, | ||
title: { | ||
fontSize: 16, | ||
fontWeight: 'bold', | ||
}, | ||
}); |
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
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,3 +1,3 @@ | ||
import TurboImage from './TurboImage'; | ||
|
||
export type { CachePolicy } from './types'; | ||
export default TurboImage; |