File tree Expand file tree Collapse file tree 2 files changed +14
-30
lines changed
packages/templates/starter-base/components Expand file tree Collapse file tree 2 files changed +14
-30
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { setAndroidNavigationBar } from '~/lib/android-navigation-bar';
3
3
import { MoonStar } from '~/lib/icons/MoonStar' ;
4
4
import { Sun } from '~/lib/icons/Sun' ;
5
5
import { useColorScheme } from '~/lib/useColorScheme' ;
6
- import { cn } from '~/lib/utils' ;
7
6
8
7
export function ThemeToggle ( ) {
9
8
const { isDarkColorScheme, setColorScheme } = useColorScheme ( ) ;
@@ -19,20 +18,13 @@ export function ThemeToggle() {
19
18
onPress = { toggleColorScheme }
20
19
className = 'web:ring-offset-background web:transition-colors web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2'
21
20
>
22
- { ( { pressed } ) => (
23
- < View
24
- className = { cn (
25
- 'flex-1 aspect-square pt-0.5 justify-center items-start web:px-5' ,
26
- pressed && 'opacity-70'
27
- ) }
28
- >
29
- { isDarkColorScheme ? (
30
- < MoonStar className = 'text-foreground' size = { 23 } strokeWidth = { 1.25 } />
31
- ) : (
32
- < Sun className = 'text-foreground' size = { 24 } strokeWidth = { 1.25 } />
33
- ) }
34
- </ View >
35
- ) }
21
+ < View className = 'flex-1 aspect-square pt-0.5 justify-center items-start web:px-5 active:opacity-70' >
22
+ { isDarkColorScheme ? (
23
+ < MoonStar className = 'text-foreground' size = { 23 } strokeWidth = { 1.25 } />
24
+ ) : (
25
+ < Sun className = 'text-foreground' size = { 24 } strokeWidth = { 1.25 } />
26
+ ) }
27
+ </ View >
36
28
</ Pressable >
37
29
) ;
38
30
}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { setAndroidNavigationBar } from '~/lib/android-navigation-bar';
3
3
import { MoonStar } from '~/lib/icons/MoonStar' ;
4
4
import { Sun } from '~/lib/icons/Sun' ;
5
5
import { useColorScheme } from '~/lib/useColorScheme' ;
6
- import { cn } from '~/lib/utils' ;
7
6
8
7
export function ThemeToggle ( ) {
9
8
const { isDarkColorScheme, setColorScheme } = useColorScheme ( ) ;
@@ -19,20 +18,13 @@ export function ThemeToggle() {
19
18
onPress = { toggleColorScheme }
20
19
className = 'web:ring-offset-background web:transition-colors web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2'
21
20
>
22
- { ( { pressed } ) => (
23
- < View
24
- className = { cn (
25
- 'flex-1 aspect-square pt-0.5 justify-center items-start web:px-5' ,
26
- pressed && 'opacity-70'
27
- ) }
28
- >
29
- { isDarkColorScheme ? (
30
- < MoonStar className = 'text-foreground' size = { 23 } strokeWidth = { 1.25 } />
31
- ) : (
32
- < Sun className = 'text-foreground' size = { 24 } strokeWidth = { 1.25 } />
33
- ) }
34
- </ View >
35
- ) }
21
+ < View className = 'flex-1 aspect-square pt-0.5 justify-center items-start web:px-5 active:opacity-70' >
22
+ { isDarkColorScheme ? (
23
+ < MoonStar className = 'text-foreground' size = { 23 } strokeWidth = { 1.25 } />
24
+ ) : (
25
+ < Sun className = 'text-foreground' size = { 24 } strokeWidth = { 1.25 } />
26
+ ) }
27
+ </ View >
36
28
</ Pressable >
37
29
) ;
38
30
}
You can’t perform that action at this time.
0 commit comments