Add broken URI handling

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-26 16:10:45 +03:00
parent 083e798fdf
commit acba17462f
17 changed files with 370 additions and 91 deletions

View File

@@ -0,0 +1,41 @@
import React, { ComponentProps } from 'react';
import { StyleSheet, View } from 'react-native';
import { useTheme } from 'react-native-paper';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
import { rgbToRgba } from '../../utilities';
const memeFailStyles = StyleSheet.create({
view: {
alignItems: 'center',
justifyContent: 'center',
},
});
const MemeFail = ({
iconSize,
...props
}: {
iconSize?: number;
} & ComponentProps<typeof View>) => {
const { colors } = useTheme();
return (
<View
{...props}
style={[
props.style,
memeFailStyles.view,
{
backgroundColor: rgbToRgba(colors.error, 0.2),
},
]}>
<FontAwesome5
name="exclamation-triangle"
size={iconSize}
color={colors.error}
/>
</View>
);
};
export default MemeFail;