| 7 | import React from "react"; |
| 8 | |
| 9 | export default function TextFieldsExample() { |
| 10 | const [text, setText] = React.useState("Hello"); |
| 11 | |
| 12 | return ( |
| 13 | <ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 20 }}> |
| 14 | <Text style={styles.header}>Text Fields Example</Text> |
| 15 | <TextField |
| 16 | value={text} |
| 17 | onValueChange={(v) => { |
| 18 | console.log("new value", v); |
| 19 | setText(v); |
| 20 | }} |
| 21 | label="Enter text" |
| 22 | /> |
| 23 | <ComposeText |
| 24 | modifier={Modifier.alpha(0.7).padding(2).border({ width: 1 })} |
| 25 | style={{ fontSize: 100, height: 200 }} |
| 26 | > |
| 27 | {text} |
| 28 | </ComposeText> |
| 29 | </ScrollView> |
| 30 | ); |
| 31 | } |
| 32 | |
| 33 | const styles = StyleSheet.create({ |
| 34 | header: { |