import { ButtonItem, Dropdown, Focusable, PanelSectionRow, SingleDropdownOption, SuspensefulImage, } from 'decky-frontend-lib'; import { FC, useState } from 'react'; import { StorePlugin, StorePluginVersion, requestPluginInstall } from '../../store'; interface PluginCardProps { plugin: StorePlugin; } const PluginCard: FC = ({ plugin }) => { const [selectedOption, setSelectedOption] = useState(0); const root: boolean = plugin.tags.some((tag) => tag === 'root'); return (
{plugin.name} {plugin.author} {plugin.description ? ( plugin.description ) : ( No description provided. )} {root && ( This plugin has full access to your Steam Deck.{' '} deckbrew.xyz/root )}
requestPluginInstall(plugin.name, plugin.versions[selectedOption])} > Install
({ data: index, label: version.name, })) as SingleDropdownOption[] } menuLabel="Plugin Version" selectedOption={selectedOption} onChange={({ data }) => setSelectedOption(data)} />
); }; export default PluginCard;