MCPcopy Create free account
hub / github.com/callstack/react-native-paper / renderDefaultOptions

Function renderDefaultOptions

example/src/Examples/AppbarExample.tsx:114–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112 };
113
114 const renderDefaultOptions = () => (
115 <>
116 <View style={styles.row}>
117 <TextComponent>Left icon</TextComponent>
118 <Switch value={showLeftIcon} onValueChange={setShowLeftIcon} />
119 </View>
120 {!theme.isV3 && (
121 <View style={styles.row}>
122 <TextComponent>Subtitle</TextComponent>
123 <Switch value={showSubtitle} onValueChange={setShowSubtitle} />
124 </View>
125 )}
126 <View style={styles.row}>
127 <TextComponent>Search icon</TextComponent>
128 <Switch value={showSearchIcon} onValueChange={setShowSearchIcon} />
129 </View>
130 <View style={styles.row}>
131 <TextComponent>More icon</TextComponent>
132 <Switch value={showMoreIcon} onValueChange={setShowMoreIcon} />
133 </View>
134 {theme.isV3 && (
135 <View style={styles.row}>
136 <TextComponent>Calendar icon</TextComponent>
137 <Switch
138 value={isCenterAlignedMode ? false : showCalendarIcon}
139 disabled={isCenterAlignedMode}
140 onValueChange={setShowCalendarIcon}
141 />
142 </View>
143 )}
144 <View style={styles.row}>
145 <TextComponent>Custom Color</TextComponent>
146 <Switch value={showCustomColor} onValueChange={setShowCustomColor} />
147 </View>
148 {!theme.isV3 && (
149 <View style={styles.row}>
150 <TextComponent>Exact Dark Theme</TextComponent>
151 <Switch value={showExactTheme} onValueChange={setShowExactTheme} />
152 </View>
153 )}
154 {theme.isV3 && (
155 <View style={styles.row}>
156 <TextComponent>Elevated</TextComponent>
157 <Switch value={showElevated} onValueChange={setShowElevated} />
158 </View>
159 )}
160 </>
161 );
162
163 return (
164 <>

Callers 1

AppbarExampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…