From 0b1c0694489b1b74b21c10ad29b59912edeb5e01 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sun, 12 May 2024 15:47:08 -0400 Subject: port to @decky/ui TODO: update package.json to match once @decky/ui is on NPM --- frontend/src/components/modals/DropdownMultiselect.tsx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'frontend/src/components/modals/DropdownMultiselect.tsx') 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< { -- cgit v1.2.3