()
| 2 | import { Text, Modifier } from "jetpack-compose-react-native"; |
| 3 | |
| 4 | export default function Modifiers() { |
| 5 | return ( |
| 6 | <ScrollView style={{ flex: 1, padding: 20 }}> |
| 7 | <RNText style={{ fontSize: 30, fontWeight: "bold", marginVertical: 20 }}> |
| 8 | Shadow |
| 9 | </RNText> |
| 10 | <Text |
| 11 | modifier={Modifier.shadow({ |
| 12 | ambientColor: "blue", |
| 13 | clip: false, |
| 14 | elevation: 10, |
| 15 | shape: "rectangle", |
| 16 | spotColor: "blue", |
| 17 | })} |
| 18 | fontSize={20} |
| 19 | > |
| 20 | Hello |
| 21 | </Text> |
| 22 | <RNText style={{ fontSize: 30, fontWeight: "bold", marginVertical: 20 }}> |
| 23 | Border |
| 24 | </RNText> |
| 25 | <Text |
| 26 | modifier={Modifier.border({ |
| 27 | color: "red", |
| 28 | width: 1, |
| 29 | brush: "solid", |
| 30 | shape: "rectangle", |
| 31 | })} |
| 32 | fontSize={20} |
| 33 | > |
| 34 | Hello |
| 35 | </Text> |
| 36 | <RNText style={{ fontSize: 30, fontWeight: "bold", marginVertical: 20 }}> |
| 37 | Padding |
| 38 | </RNText> |
| 39 | <Text |
| 40 | modifier={Modifier.padding({ horizontal: 10, vertical: 20 })} |
| 41 | fontSize={20} |
| 42 | > |
| 43 | Hello |
| 44 | </Text> |
| 45 | <RNText style={{ fontSize: 30, fontWeight: "bold", marginVertical: 20 }}> |
| 46 | Width |
| 47 | </RNText> |
| 48 | <Text modifier={Modifier.width(100)} fontSize={20}> |
| 49 | Hello |
| 50 | </Text> |
| 51 | <RNText style={{ fontSize: 30, fontWeight: "bold", marginVertical: 20 }}> |
| 52 | Height |
| 53 | </RNText> |
| 54 | <Text modifier={Modifier.height(50)} fontSize={20}> |
| 55 | Hello |
| 56 | </Text> |
| 57 | <RNText style={{ fontSize: 30, fontWeight: "bold", marginVertical: 20 }}> |
| 58 | Size |
| 59 | </RNText> |
| 60 | <Text modifier={Modifier.size(100)} fontSize={20}> |
| 61 | Hello |
nothing calls this directly
no test coverage detected