|
1 | | -import { Fragment } from 'react' |
2 | 1 | import { |
3 | 2 | Menu, |
4 | | - Button, |
5 | | - Transition, |
6 | | - MenuItems, |
7 | | - MenuItem, |
8 | 3 | } from '@headlessui/react' |
9 | 4 | import { CheckIcon } from '@heroicons/react/24/outline' |
10 | 5 | import { CogIcon } from '@/components/graph/CogIcon' |
@@ -33,41 +28,29 @@ export function SettingsControl({ |
33 | 28 | aria-hidden="true" |
34 | 29 | /> |
35 | 30 | </Menu.Button> |
36 | | - <Transition |
37 | | - as={Fragment} |
38 | | - enter="transition ease-out duration-100" |
39 | | - enterFrom="transform opacity-0 scale-95" |
40 | | - enterTo="transform opacity-100 scale-100" |
41 | | - leave="transition ease-in duration-75" |
42 | | - leaveFrom="transform opacity-100 scale-100" |
43 | | - leaveTo="transform opacity-0 scale-95" |
44 | | - > |
45 | | - <Menu.Items className="absolute bottom-full mb-2 left-0 w-56 origin-bottom-left divide-y divide-neutral-100 dark:divide-neutral-800 rounded-md bg-theme shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-50"> |
46 | | - <div className="px-1 py-1"> |
47 | | - <Menu.Item> |
48 | | - {({ active }) => ( |
49 | | - <button |
50 | | - className={clsx( |
51 | | - 'group flex w-full items-center rounded-md px-2 py-2 text-sm', |
52 | | - active |
53 | | - ? 'bg-primary-10 text-primary-500' |
54 | | - : 'text-neutral-700 dark:text-neutral-300', |
55 | | - )} |
56 | | - onClick={() => onWithColumnsChange(!showColumns)} |
57 | | - > |
58 | | - <span className="flex-1 text-left">Show Columns</span> |
59 | | - {showColumns && ( |
60 | | - <CheckIcon |
61 | | - className="h-4 w-4 text-primary-500" |
62 | | - aria-hidden="true" |
63 | | - /> |
64 | | - )} |
65 | | - </button> |
| 31 | + <Menu.Items className="absolute bottom-0 left-full ml-2 w-56 origin-bottom-left divide-y bg-theme shadow-lg focus:outline-none z-50"> |
| 32 | + <Menu.Item> |
| 33 | + {({ active }) => ( |
| 34 | + <button |
| 35 | + className={clsx( |
| 36 | + 'group flex w-full items-center px-2 py-1 text-sm', |
| 37 | + active |
| 38 | + ? 'text-[var(--vscode-foreground)] bg-[var(--vscode-button-background)]' |
| 39 | + : 'bg-[var(--vscode-button-hoverBackground)] text-[var(--vscode-foreground)]', |
| 40 | + )} |
| 41 | + onClick={() => onWithColumnsChange(!showColumns)} |
| 42 | + > |
| 43 | + <span className="flex-1 text-left">Show Columns</span> |
| 44 | + {showColumns && ( |
| 45 | + <CheckIcon |
| 46 | + className="h-4 w-4 text-primary-500" |
| 47 | + aria-hidden="true" |
| 48 | + /> |
66 | 49 | )} |
67 | | - </Menu.Item> |
68 | | - </div> |
69 | | - </Menu.Items> |
70 | | - </Transition> |
| 50 | + </button> |
| 51 | + )} |
| 52 | + </Menu.Item> |
| 53 | + </Menu.Items> |
71 | 54 | </Menu> |
72 | 55 | ) |
73 | 56 | } |
0 commit comments