This repository was archived by the owner on Feb 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +22
-29
lines changed Expand file tree Collapse file tree 4 files changed +22
-29
lines changed Original file line number Diff line number Diff line change 17
17
"react-dom" : " ^16.13.1"
18
18
},
19
19
"dependencies" : {
20
- "@headlessui/react" : " ^0.2.0" ,
21
20
"prop-types" : " ^15.7.2" ,
22
21
"react-feather" : " ^2.0.8" ,
23
22
"react-transition-group" : " ^4.4.1"
Original file line number Diff line number Diff line change 1
1
import React , { useState } from 'react'
2
- import { Switch } from '@headlessui/react'
2
+ // import { Switch } from '@headlessui/react'
3
3
4
4
export default function ( { label } ) {
5
5
const [ switchValue , setSwitchValue ] = useState ( false )
6
6
7
7
return (
8
- < Switch . Group as = "div" className = "flex items-center space-x-4" >
9
- < Switch . Label > { label } </ Switch . Label >
10
- < Switch
11
- as = "button"
12
- checked = { switchValue }
13
- onChange = { setSwitchValue }
14
- className = { `${
15
- switchValue ? 'bg-indigo-600' : 'bg-gray-200'
16
- } p-0 relative inline-flex flex-shrink-0 h-6 transition-colors duration-200 ease-in-out border-2 border-transparent rounded-full cursor-pointer w-11 focus:outline-none focus:ring`}
17
- >
18
- { ( { checked } ) => (
19
- < span
20
- className = { `${
21
- checked ? 'translate-x-5' : 'translate-x-0'
22
- } inline-block w-5 h-5 transition duration-200 ease-in-out transform bg-white rounded-full`}
23
- />
24
- ) }
25
- </ Switch >
26
- </ Switch . Group >
8
+ // <Switch.Group as="div" className="flex items-center space-x-4">
9
+ // <Switch.Label>{label}</Switch.Label>
10
+ // <Switch
11
+ // as="button"
12
+ // checked={switchValue}
13
+ // onChange={setSwitchValue}
14
+ // className={`${
15
+ // switchValue ? 'bg-indigo-600' : 'bg-gray-200'
16
+ // } p-0 relative inline-flex flex-shrink-0 h-6 transition-colors duration-200 ease-in-out border-2 border-transparent rounded-full cursor-pointer w-11 focus:outline-none focus:ring` }
17
+ // >
18
+ // {({ checked }) => (
19
+ // <span
20
+ // className={`${
21
+ // checked ? 'translate-x-5' : 'translate-x-0'
22
+ // } inline-block w-5 h-5 transition duration-200 ease-in-out transform bg-white rounded-full` }
23
+ // />
24
+ // )}
25
+ // </Switch>
26
+ // </Switch.Group>
27
+ < span > </ span >
27
28
)
28
29
}
Original file line number Diff line number Diff line change 1431
1431
dependencies:
1432
1432
"@hapi/hoek" "^8.3.0"
1433
1433
1434
- "@headlessui/react@^0.2.0":
1435
- "integrity" "sha512-YV+vF+QhTRcspydPdHF3ZXe+FkOiJpRdqMjjFIIX9bSdT2O2T7GurgKQdGgamNUM+B99MZBOTRqxS8Dlh485eg=="
1436
- "resolved" "https://registry.npmjs.org/@headlessui/react/-/react-0.2.0.tgz"
1437
- "version" "0.2.0"
1438
-
1439
1434
"@icons/material@^0.2.4":
1440
1435
"integrity" "sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw=="
1441
1436
"resolved" "https://registry.npmjs.org/@icons/material/-/material-0.2.4.tgz"
You can’t perform that action at this time.
0 commit comments