|
1 | | -import { Button, HStack, Picker, Popover, Text, VStack } from "@expo/ui/swift-ui"; |
| 1 | +import { Button, HStack, Picker, Popover, Spacer, Text, VStack } from "@expo/ui/swift-ui"; |
2 | 2 | import { |
3 | 3 | accessibilityLabel, |
| 4 | + buttonBorderShape, |
4 | 5 | buttonStyle, |
5 | 6 | disabled, |
6 | 7 | font, |
7 | 8 | foregroundStyle, |
8 | 9 | frame, |
| 10 | + labelStyle, |
9 | 11 | padding, |
10 | 12 | pickerStyle, |
11 | 13 | presentationBackground, |
12 | 14 | tag, |
| 15 | + tint, |
13 | 16 | } from "@expo/ui/swift-ui/modifiers"; |
14 | 17 | import { useState } from "react"; |
15 | 18 |
|
@@ -71,19 +74,33 @@ export function NumberField(props: NumberFieldProps) { |
71 | 74 | </Text> |
72 | 75 | ))} |
73 | 76 | </Picker> |
74 | | - <HStack spacing={24}> |
| 77 | + <HStack> |
75 | 78 | <Button |
76 | 79 | label="Cancel" |
| 80 | + systemImage="xmark" |
77 | 81 | onPress={() => setOpen(false)} |
78 | | - modifiers={[foregroundStyle(colors["--color-primary-text"])]} |
| 82 | + modifiers={[ |
| 83 | + labelStyle("iconOnly"), |
| 84 | + buttonStyle("bordered"), |
| 85 | + buttonBorderShape("circle"), |
| 86 | + tint(colors["--color-foreground"]), |
| 87 | + ]} |
79 | 88 | /> |
| 89 | + <Spacer /> |
80 | 90 | <Button |
81 | 91 | label="Done" |
| 92 | + systemImage="checkmark" |
82 | 93 | onPress={() => { |
83 | 94 | setOpen(false); |
84 | 95 | if (!props.disabled && draft !== props.value) props.onValueChange(draft); |
85 | 96 | }} |
86 | | - modifiers={[foregroundStyle(colors["--color-primary-text"])]} |
| 97 | + modifiers={[ |
| 98 | + labelStyle("iconOnly"), |
| 99 | + buttonStyle("borderedProminent"), |
| 100 | + buttonBorderShape("circle"), |
| 101 | + tint(colors["--color-prominent-action"]), |
| 102 | + foregroundStyle(colors["--color-prominent-action-foreground"]), |
| 103 | + ]} |
87 | 104 | /> |
88 | 105 | </HStack> |
89 | 106 | </VStack> |
|
0 commit comments