File tree Expand file tree Collapse file tree 3 files changed +102
-37
lines changed
examples/wagemos-xion-nextjs Expand file tree Collapse file tree 3 files changed +102
-37
lines changed Original file line number Diff line number Diff line change 26
26
"@radix-ui/react-label" : " ^2.0.2" ,
27
27
"@radix-ui/react-select" : " ^2.0.0" ,
28
28
"@radix-ui/react-slot" : " ^1.0.2" ,
29
+ "@radix-ui/react-switch" : " ^1.1.1" ,
29
30
"@radix-ui/react-toast" : " ^1.1.5" ,
30
31
"@tanstack/react-query" : " ^4.35.1" ,
31
32
"@tanstack/react-query-devtools" : " ^5.40.0" ,
Original file line number Diff line number Diff line change
1
+ import { Switch } from '@radix-ui/react-switch'
2
+ import { Label } from '../../components/ui/label'
1
3
import { useDevMode } from '../_providers/dev-mode'
2
4
import { WalletButton } from './wallet-button'
3
5
@@ -15,22 +17,23 @@ export const Header = () => {
15
17
16
18
{ /* Right section */ }
17
19
< div className = "w-32 flex items-center justify-end gap-2" >
18
- < button
19
- onClick = { ( ) => setDevMode ( ! devMode ) }
20
- className = { `px-3 py-1.5 text-sm rounded-md transition-colors
21
- ${
22
- devMode
23
- ? 'bg-purple-100 text-purple-700 hover:bg-purple-200'
24
- : 'bg-gray-100 text-gray-700 hover:bg-gray-200'
25
- } `}
26
- type = { 'button' }
27
- >
28
- { devMode ? 'Dev Mode On' : 'Dev Mode' }
29
- </ button >
20
+ < div className = "flex items-center space-x-2" >
21
+ < Switch
22
+ id = "dev-mode"
23
+ checked = { devMode }
24
+ onCheckedChange = { setDevMode }
25
+ />
26
+ < Label
27
+ htmlFor = "dev-mode"
28
+ className = "text-sm font-medium leading-none"
29
+ >
30
+ Dev Mode
31
+ </ Label >
32
+ </ div >
33
+ </ div >
34
+ < div className = { 'flex justify-end' } >
35
+ < WalletButton />
30
36
</ div >
31
- </ div >
32
- < div className = { 'flex justify-end' } >
33
- < WalletButton />
34
37
</ div >
35
38
</ header >
36
39
)
You can’t perform that action at this time.
0 commit comments