MCPcopy Create free account
hub / github.com/andrew-levy/jetpack-compose-react-native / TextFieldsExample

Function TextFieldsExample

example/app/textfields.tsx:9–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import React from "react";
8
9export 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
33const styles = StyleSheet.create({
34 header: {

Callers

nothing calls this directly

Calls 3

borderMethod · 0.65
paddingMethod · 0.65
alphaMethod · 0.65

Tested by

no test coverage detected