import {Text, SafeAreaView, StyleSheet,View } from 'react-native';
import {useState} from 'react'
// You can import supported modules from npm
import { Button,Card,TextInput } from 'react-native-paper';
// or any files within the Snack
import AssetExample from './components/AssetExample';
export default function App() {
const [color,setColor] = useState("black")
Turngreen = ()=>{
setColor("green")
}
Turnblue = ()=>{
setColor("blue")
}
Turnred = ()=>{
setColor("red")
}
return (
<View>
<Button mode="contained" onPress={() => Turnblue()} style={{marginTop:10,backgroundColor:'blue',width:100}}>
BLUE
</Button>
<Button mode="contained" onPress={() => Turngreen()} style={{marginTop:6,backgroundColor:'green', width:100}}>
GREEN
</Button>
<Button mode="contained" onPress={() => Turnred()} style={{marginTop:6,backgroundColor:'red', width:100}}>
red
</Button>
<Text style={{color:`${color}`,padding:4,fontSize:30,fontWeight:500}}>
Color change
</Text>
</View>
);
}