summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals/DropdownMultiselect.tsx
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-05-12 15:47:08 -0400
committerAAGaming <aagaming@riseup.net>2024-05-12 15:47:08 -0400
commit0b1c0694489b1b74b21c10ad29b59912edeb5e01 (patch)
tree659ef5ba75e3678c60bbf27c8a854e00e0bf74b2 /frontend/src/components/modals/DropdownMultiselect.tsx
parent43b940e216e6b654e689cf791d298d57215196d4 (diff)
downloaddecky-loader-0b1c0694489b1b74b21c10ad29b59912edeb5e01.tar.gz
decky-loader-0b1c0694489b1b74b21c10ad29b59912edeb5e01.zip
port to @decky/ui
TODO: update package.json to match once @decky/ui is on NPM
Diffstat (limited to 'frontend/src/components/modals/DropdownMultiselect.tsx')
-rw-r--r--frontend/src/components/modals/DropdownMultiselect.tsx17
1 files changed, 7 insertions, 10 deletions
diff --git a/frontend/src/components/modals/DropdownMultiselect.tsx b/frontend/src/components/modals/DropdownMultiselect.tsx
index 5defbfa4..4c5cf7b1 100644
--- a/frontend/src/components/modals/DropdownMultiselect.tsx
+++ b/frontend/src/components/modals/DropdownMultiselect.tsx
@@ -2,24 +2,21 @@ import {
DialogButton,
DialogCheckbox,
DialogCheckboxProps,
+ Export,
Marquee,
Menu,
MenuItem,
- findModuleChild,
+ findModuleExport,
showContextMenu,
-} from 'decky-frontend-lib';
+} from '@decky/ui';
import { FC, useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { FaChevronDown } from 'react-icons/fa';
-const dropDownControlButtonClass = findModuleChild((m) => {
- if (typeof m !== 'object') return undefined;
- for (const prop in m) {
- if (m[prop]?.toString()?.includes('gamepaddropdown_DropDownControlButton')) {
- return m[prop];
- }
- }
-});
+// TODO add to dfl
+const dropDownControlButtonClass = findModuleExport((e: Export) =>
+ e?.toString()?.includes('gamepaddropdown_DropDownControlButton'),
+);
const DropdownMultiselectItem: FC<
{