()
| 7 | import ScreenWrapper from '../ScreenWrapper'; |
| 8 | |
| 9 | const ButtonExample = () => { |
| 10 | const theme = useExampleTheme(); |
| 11 | |
| 12 | const color = theme.isV3 ? theme.colors.inversePrimary : theme.colors.accent; |
| 13 | |
| 14 | return ( |
| 15 | <ScreenWrapper> |
| 16 | <List.Section title={`Text button ${theme.isV3 ? '(text)' : ''}`}> |
| 17 | <View style={styles.row}> |
| 18 | <Button onPress={() => {}} style={styles.button}> |
| 19 | Default |
| 20 | </Button> |
| 21 | <Button textColor={color} onPress={() => {}} style={styles.button}> |
| 22 | Custom |
| 23 | </Button> |
| 24 | <Button disabled onPress={() => {}} style={styles.button}> |
| 25 | Disabled |
| 26 | </Button> |
| 27 | <Button icon="camera" onPress={() => {}} style={styles.button}> |
| 28 | Icon |
| 29 | </Button> |
| 30 | <Button loading onPress={() => {}} style={styles.button}> |
| 31 | Loading |
| 32 | </Button> |
| 33 | <Button |
| 34 | icon="camera" |
| 35 | onPress={() => {}} |
| 36 | style={styles.button} |
| 37 | contentStyle={styles.flexReverse} |
| 38 | > |
| 39 | Icon right |
| 40 | </Button> |
| 41 | </View> |
| 42 | </List.Section> |
| 43 | {theme.isV3 && ( |
| 44 | <List.Section title="Contained-tonal button (tonal)"> |
| 45 | <View style={styles.row}> |
| 46 | <Button |
| 47 | mode="contained-tonal" |
| 48 | onPress={() => {}} |
| 49 | style={styles.button} |
| 50 | > |
| 51 | Default |
| 52 | </Button> |
| 53 | <Button |
| 54 | mode="contained-tonal" |
| 55 | buttonColor={color} |
| 56 | onPress={() => {}} |
| 57 | style={styles.button} |
| 58 | > |
| 59 | Custom |
| 60 | </Button> |
| 61 | <Button |
| 62 | mode="contained-tonal" |
| 63 | disabled |
| 64 | onPress={() => {}} |
| 65 | style={styles.button} |
| 66 | > |
nothing calls this directly
no test coverage detected
searching dependent graphs…