@@ -18,7 +18,7 @@ expect.extend(matchers)
1818test ( 'renders with color modes' , ( ) => {
1919 let json
2020 let mode
21- const Mode = props => {
21+ const Mode = ( props ) => {
2222 const [ colorMode ] = useColorMode ( )
2323 mode = colorMode
2424 return < div > Mode</ div >
@@ -46,7 +46,7 @@ test('renders with color modes', () => {
4646test ( 'renders with initial color mode name' , ( ) => {
4747 let json
4848 let mode
49- const Mode = props => {
49+ const Mode = ( props ) => {
5050 const [ colorMode ] = useColorMode ( )
5151 mode = colorMode
5252 return < div > Mode</ div >
@@ -71,12 +71,12 @@ test('renders with initial color mode name', () => {
7171
7272test ( 'useColorMode updates color mode state' , ( ) => {
7373 let mode
74- const Button = props => {
74+ const Button = ( props ) => {
7575 const [ colorMode , setMode ] = useColorMode ( )
7676 mode = colorMode
7777 return (
7878 < button
79- onClick = { e => {
79+ onClick = { ( e ) => {
8080 setMode ( 'dark' )
8181 } }
8282 children = "test"
@@ -95,15 +95,15 @@ test('useColorMode updates color mode state', () => {
9595
9696test ( 'color mode is passed through theme context' , ( ) => {
9797 let mode
98- const Button = props => {
98+ const Button = ( props ) => {
9999 const [ colorMode , setMode ] = useColorMode ( )
100100 mode = colorMode
101101 return (
102102 < button
103103 sx = { {
104104 color : 'text' ,
105105 } }
106- onClick = { e => {
106+ onClick = { ( e ) => {
107107 setMode ( 'dark' )
108108 } }
109109 children = "test"
@@ -133,7 +133,7 @@ test('color mode is passed through theme context', () => {
133133} )
134134
135135test ( 'converts color modes to css custom properties' , ( ) => {
136- const Box = props => (
136+ const Box = ( props ) => (
137137 < div
138138 sx = { {
139139 color : 'text' ,
@@ -164,7 +164,7 @@ test('converts color modes to css custom properties', () => {
164164
165165test ( 'uses default mode' , ( ) => {
166166 let mode
167- const Button = props => {
167+ const Button = ( props ) => {
168168 const [ colorMode , setMode ] = useColorMode ( )
169169 mode = colorMode
170170 return < button children = "test" />
@@ -180,7 +180,7 @@ test('uses default mode', () => {
180180test ( 'initializes mode based on localStorage' , ( ) => {
181181 window . localStorage . setItem ( STORAGE_KEY , 'dark' )
182182 let mode
183- const Button = props => {
183+ const Button = ( props ) => {
184184 const [ colorMode , setMode ] = useColorMode ( )
185185 mode = colorMode
186186 return < button children = "test" />
@@ -195,7 +195,7 @@ test('initializes mode based on localStorage', () => {
195195
196196test ( 'inherits color mode state from parent context' , ( ) => {
197197 let mode
198- const Consumer = props => {
198+ const Consumer = ( props ) => {
199199 const [ colorMode ] = useColorMode ( )
200200 mode = colorMode
201201 return null
@@ -223,7 +223,7 @@ test('inherits color mode state from parent context', () => {
223223
224224test ( 'retains initial context' , ( ) => {
225225 let context
226- const Consumer = props => {
226+ const Consumer = ( props ) => {
227227 context = useThemeUI ( )
228228 return null
229229 }
@@ -237,14 +237,14 @@ test('retains initial context', () => {
237237} )
238238
239239test ( 'initializes mode from prefers-color-scheme media query' , ( ) => {
240- window . matchMedia = jest . fn ( ) . mockImplementation ( query => {
240+ window . matchMedia = jest . fn ( ) . mockImplementation ( ( query ) => {
241241 return {
242242 matches : true ,
243243 media : query ,
244244 }
245245 } )
246246 let mode
247- const Consumer = props => {
247+ const Consumer = ( props ) => {
248248 const [ colorMode ] = useColorMode ( )
249249 mode = colorMode
250250 return null
@@ -261,14 +261,14 @@ test('initializes mode from prefers-color-scheme media query', () => {
261261} )
262262
263263test ( 'does not initialize mode from prefers-color-scheme media query' , ( ) => {
264- window . matchMedia = jest . fn ( ) . mockImplementation ( query => {
264+ window . matchMedia = jest . fn ( ) . mockImplementation ( ( query ) => {
265265 return {
266266 matches : false ,
267267 media : query ,
268268 }
269269 } )
270270 let mode
271- const Consumer = props => {
271+ const Consumer = ( props ) => {
272272 const [ colorMode ] = useColorMode ( )
273273 mode = colorMode
274274 return null
@@ -285,14 +285,14 @@ test('does not initialize mode from prefers-color-scheme media query', () => {
285285} )
286286
287287test ( 'does not initialize mode from prefers-color-scheme media query when useColorSchemeMediaQuery is not set' , ( ) => {
288- window . matchMedia = jest . fn ( ) . mockImplementation ( query => {
288+ window . matchMedia = jest . fn ( ) . mockImplementation ( ( query ) => {
289289 return {
290290 matches : true ,
291291 media : query ,
292292 }
293293 } )
294294 let mode
295- const Consumer = props => {
295+ const Consumer = ( props ) => {
296296 const [ colorMode ] = useColorMode ( )
297297 mode = colorMode
298298 return null
@@ -308,7 +308,7 @@ test('does not initialize mode from prefers-color-scheme media query when useCol
308308test ( 'useColorMode throws when there is no theme context' , ( ) => {
309309 const restore = mockConsole ( )
310310 expect ( ( ) => {
311- const Consumer = props => {
311+ const Consumer = ( props ) => {
312312 const _ = useColorMode ( 'beep' )
313313 return null
314314 }
@@ -372,14 +372,14 @@ test('warns when initialColorModeName matches a key in theme.colors.modes', () =
372372} )
373373
374374test ( 'dot notation works with color modes' , ( ) => {
375- const Button = props => {
375+ const Button = ( props ) => {
376376 const [ colorMode , setMode ] = useColorMode ( )
377377 return (
378378 < button
379379 sx = { {
380380 color : 'header.title' ,
381381 } }
382- onClick = { e => {
382+ onClick = { ( e ) => {
383383 setMode ( 'dark' )
384384 } }
385385 children = "test"
@@ -412,14 +412,14 @@ test('dot notation works with color modes', () => {
412412} )
413413
414414test ( 'dot notation works with color modes and custom properties' , ( ) => {
415- const Button = props => {
415+ const Button = ( props ) => {
416416 const [ colorMode , setMode ] = useColorMode ( )
417417 return (
418418 < button
419419 sx = { {
420420 color : 'header.title' ,
421421 } }
422- onClick = { e => {
422+ onClick = { ( e ) => {
423423 setMode ( 'dark' )
424424 } }
425425 children = "test"
@@ -455,7 +455,7 @@ test('dot notation works with color modes and custom properties', () => {
455455
456456test ( 'raw color values are passed to theme-ui context when custom properties are enabled' , ( ) => {
457457 let color
458- const Grabber = props => {
458+ const Grabber = ( props ) => {
459459 const context = useThemeUI ( )
460460 color = context . theme . colors ! . primary
461461 return null
@@ -486,7 +486,7 @@ test('warns when localStorage is disabled', () => {
486486 } )
487487
488488 let mode
489- const Consumer = props => {
489+ const Consumer = ( props ) => {
490490 const [ colorMode ] = useColorMode ( )
491491 mode = colorMode
492492 return null
0 commit comments