parent
7b16deabe0
commit
9400f85860
15 changed files with 357 additions and 294 deletions
@ -0,0 +1,44 @@ |
||||
import { View, Text, Pressable, Appearance } from "react-native"; |
||||
import React from "react"; |
||||
|
||||
//style
|
||||
import Colors from "../constants/Colors"; |
||||
import tw from "tailwind-rn"; |
||||
import fontSize from "../constants/fontSize"; |
||||
|
||||
const Empty = ({ text, buttonText, buttonAction }) => { |
||||
const colorScheme = Appearance.getColorScheme(); |
||||
return ( |
||||
<View style={tw("flex-1 flex justify-center items-center")}> |
||||
<Text |
||||
style={[ |
||||
tw("text-gray-500"), |
||||
{ |
||||
fontFamily: "regular", |
||||
fontSize: fontSize.tiny, |
||||
transform: [{ translateY: -50 }], |
||||
}, |
||||
]} |
||||
> |
||||
{text + " " + ":("} |
||||
</Text> |
||||
{buttonText && ( |
||||
<Pressable style={[tw('py-2 px-5 rounded-sm'),{ backgroundColor: Colors.theme1[colorScheme].greenCF }]} onPress={() => buttonAction()}> |
||||
<Text |
||||
style={[ |
||||
tw("text-white"), |
||||
{ |
||||
fontFamily: "regular", |
||||
fontSize: fontSize.tiny, |
||||
}, |
||||
]} |
||||
> |
||||
{buttonText} |
||||
</Text> |
||||
</Pressable> |
||||
)} |
||||
</View> |
||||
); |
||||
}; |
||||
|
||||
export default Empty; |
Loading…
Reference in new issue