|
1 | | -import React, { Fragment, useState } from 'react'; |
2 | | -import { Listbox, Transition } from '@headlessui/react'; |
3 | | -import { CheckIcon, ChevronUpDownIcon } from '@heroicons/react/20/solid'; |
4 | | -const authKeys = [{ name: 'Select Auth Key' }, { name: 'No Authorization' }]; |
| 1 | +// ToDo: Remove as we ar not using it |
| 2 | +// import React, { Fragment, useState } from 'react'; |
| 3 | +// import { Listbox, Transition } from '@headlessui/react'; |
| 4 | +// import { CheckIcon, ChevronUpDownIcon } from '@heroicons/react/20/solid'; |
| 5 | +// const authKeys = [{ name: 'Select Auth Key' }, { name: 'No Authorization' }]; |
5 | 6 |
|
6 | | -const SelectAuthKeys = () => { |
7 | | - const [selected, setSelected] = useState(authKeys[0]); |
8 | | - return ( |
9 | | - <Listbox value={selected} onChange={setSelected}> |
10 | | - <div className='relative rounded border border-solid border-[#94a3b8]'> |
11 | | - <Listbox.Button className='relative w-full py-2 pl-3 pr-10 text-left bg-white rounded-lg cursor-default sm:text-sm'> |
12 | | - <span className='block truncate'>{selected.name}</span> |
13 | | - <span className='absolute flex items-center pr-2 pointer-events-none right-2 top-3'> |
14 | | - <ChevronUpDownIcon className='w-5 h-5 text-gray-400' aria-hidden='true' /> |
15 | | - </span> |
16 | | - </Listbox.Button> |
17 | | - <Transition as={Fragment} leave='transition ease-in duration-100' leaveFrom='opacity-100' leaveTo='opacity-0'> |
18 | | - <Listbox.Options className='absolute z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded-md shadow-lg sm:text-sm max-h-60 ring-1 ring-black/5'> |
19 | | - {authKeys.map((authKey, authKeyIdx) => ( |
20 | | - <Listbox.Option |
21 | | - key={authKeyIdx} |
22 | | - className={({ active }) => |
23 | | - `relative cursor-default select-none py-2 pl-10 pr-4 ${ |
24 | | - active ? 'bg-amber-100 text-amber-900' : 'text-gray-900' |
25 | | - }` |
26 | | - } |
27 | | - value={authKey} |
28 | | - > |
29 | | - {({ selected }) => ( |
30 | | - <> |
31 | | - <span className={`block truncate ${selected ? 'font-medium' : 'font-normal'}`}>{authKey.name}</span> |
32 | | - {selected ? ( |
33 | | - <span className='absolute inset-y-0 left-0 flex items-center pl-3 text-amber-600'> |
34 | | - <CheckIcon className='w-5 h-5' aria-hidden='true' /> |
35 | | - </span> |
36 | | - ) : null} |
37 | | - </> |
38 | | - )} |
39 | | - </Listbox.Option> |
40 | | - ))} |
41 | | - </Listbox.Options> |
42 | | - </Transition> |
43 | | - </div> |
44 | | - </Listbox> |
45 | | - ); |
46 | | -}; |
| 7 | +// const SelectAuthKeys = () => { |
| 8 | +// const [selected, setSelected] = useState(authKeys[0]); |
| 9 | +// return ( |
| 10 | +// <Listbox value={selected} onChange={setSelected}> |
| 11 | +// <div className='relative rounded border border-solid border-[#94a3b8]'> |
| 12 | +// <Listbox.Button className='relative w-full py-2 pl-3 pr-10 text-left bg-white rounded-lg cursor-default sm:text-sm'> |
| 13 | +// <span className='block truncate'>{selected.name}</span> |
| 14 | +// <span className='absolute flex items-center pr-2 pointer-events-none right-2 top-3'> |
| 15 | +// <ChevronUpDownIcon className='w-5 h-5 text-gray-400' aria-hidden='true' /> |
| 16 | +// </span> |
| 17 | +// </Listbox.Button> |
| 18 | +// <Transition as={Fragment} leave='transition ease-in duration-100' leaveFrom='opacity-100' leaveTo='opacity-0'> |
| 19 | +// <Listbox.Options className='absolute z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded-md shadow-lg max-h-60 ring-1 ring-black/5 sm:text-sm'> |
| 20 | +// {authKeys.map((authKey, authKeyIdx) => ( |
| 21 | +// <Listbox.Option |
| 22 | +// key={authKeyIdx} |
| 23 | +// className={({ active }) => |
| 24 | +// `relative cursor-default select-none py-2 pl-10 pr-4 ${ |
| 25 | +// active ? 'bg-amber-100 text-amber-900' : 'text-gray-900' |
| 26 | +// }` |
| 27 | +// } |
| 28 | +// value={authKey} |
| 29 | +// > |
| 30 | +// {({ selected }) => ( |
| 31 | +// <> |
| 32 | +// <span className={`block truncate ${selected ? 'font-medium' : 'font-normal'}`}>{authKey.name}</span> |
| 33 | +// {selected ? ( |
| 34 | +// <span className='absolute inset-y-0 left-0 flex items-center pl-3 text-amber-600'> |
| 35 | +// <CheckIcon className='w-5 h-5' aria-hidden='true' /> |
| 36 | +// </span> |
| 37 | +// ) : null} |
| 38 | +// </> |
| 39 | +// )} |
| 40 | +// </Listbox.Option> |
| 41 | +// ))} |
| 42 | +// </Listbox.Options> |
| 43 | +// </Transition> |
| 44 | +// </div> |
| 45 | +// </Listbox> |
| 46 | +// ); |
| 47 | +// }; |
47 | 48 |
|
48 | | -export default SelectAuthKeys; |
| 49 | +// export default SelectAuthKeys; |
0 commit comments