Skip to content

Commit 95f540b

Browse files
committed
update RNTester example
1 parent a6cbf7c commit 95f540b

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,100 @@ function PlatformColorsExample() {
122122
{label: 'clear', color: PlatformColor('clear')},
123123
{label: 'customColor', color: PlatformColor('customColor')},
124124
];
125+
// [macOS
126+
} else if (Platform.OS === 'macos') {
127+
colors = [
128+
// https://developer.apple.com/documentation/appkit/nscolor
129+
// Text Colors
130+
{label: 'labelColor', color: PlatformColor('labelColor')},
131+
{
132+
label: 'secondaryLabelColor',
133+
color: PlatformColor('secondaryLabelColor'),
134+
},
135+
{
136+
label: 'tertiaryLabelColor',
137+
color: PlatformColor('tertiaryLabelColor'),
138+
},
139+
{
140+
label: 'quaternaryLabelColor',
141+
color: PlatformColor('quaternaryLabelColor'),
142+
},
143+
{label: 'textColor', color: PlatformColor('textColor')},
144+
{
145+
label: 'placeholderTextColor',
146+
color: PlatformColor('placeholderTextColor'),
147+
},
148+
{
149+
label: 'selectedTextColor',
150+
color: PlatformColor('selectedTextColor'),
151+
},
152+
{
153+
label: 'selectedTextBackgroundColor',
154+
color: PlatformColor('selectedTextBackgroundColor'),
155+
},
156+
// Window and Control Colors
157+
{
158+
label: 'windowBackgroundColor',
159+
color: PlatformColor('windowBackgroundColor'),
160+
},
161+
{
162+
label: 'underPageBackgroundColor',
163+
color: PlatformColor('underPageBackgroundColor'),
164+
},
165+
{
166+
label: 'controlBackgroundColor',
167+
color: PlatformColor('controlBackgroundColor'),
168+
},
169+
{
170+
label: 'selectedControlColor',
171+
color: PlatformColor('selectedControlColor'),
172+
},
173+
{
174+
label: 'keyboardFocusIndicatorColor',
175+
color: PlatformColor('keyboardFocusIndicatorColor'),
176+
},
177+
// System Colors
178+
{
179+
label: 'systemBlueColor',
180+
color: PlatformColor('systemBlueColor'),
181+
},
182+
{
183+
label: 'systemBrownColor',
184+
color: PlatformColor('systemBrownColor'),
185+
},
186+
{
187+
label: 'systemGreenColor',
188+
color: PlatformColor('systemGreenColor'),
189+
},
190+
{
191+
label: 'systemOrangeColor',
192+
color: PlatformColor('systemOrangeColor'),
193+
},
194+
{
195+
label: 'systemPinkColor',
196+
color: PlatformColor('systemPinkColor'),
197+
},
198+
{
199+
label: 'systemPurpleColor',
200+
color: PlatformColor('systemPurpleColor'),
201+
},
202+
{
203+
label: 'systemRedColor',
204+
color: PlatformColor('systemRedColor'),
205+
},
206+
{
207+
label: 'systemYellowColor',
208+
color: PlatformColor('systemYellowColor'),
209+
},
210+
// Accents and Grays
211+
{
212+
label: 'controlAccentColor',
213+
color: PlatformColor('controlAccentColor'),
214+
},
215+
{label: 'separatorColor', color: PlatformColor('separatorColor')},
216+
{label: 'gridColor', color: PlatformColor('gridColor')},
217+
{label: 'windowFrameColor', color: PlatformColor('windowFrameColor')},
218+
]; // macOS]
125219
} else if (Platform.OS === 'android') {
126220
colors = [
127221
{label: '?attr/colorAccent', color: PlatformColor('?attr/colorAccent')},

0 commit comments

Comments
 (0)