From 5960c11d60bccb732ead19fdb0b4547806f70f70 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 17 Aug 2022 15:27:22 -0400 Subject: add class names to PluginCard for theming --- frontend/src/components/store/PluginCard.tsx | 31 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'frontend/src') diff --git a/frontend/src/components/store/PluginCard.tsx b/frontend/src/components/store/PluginCard.tsx index b2ea3c54..8bc59475 100644 --- a/frontend/src/components/store/PluginCard.tsx +++ b/frontend/src/components/store/PluginCard.tsx @@ -6,6 +6,7 @@ import { Router, SingleDropdownOption, SuspensefulImage, + joinClassNames, staticClasses, } from 'decky-frontend-lib'; import { FC, useRef, useState } from 'react'; @@ -22,10 +23,6 @@ interface PluginCardProps { plugin: StorePlugin | LegacyStorePlugin; } -const classNames = (...classes: string[]) => { - return classes.join(' '); -}; - function isLegacyPlugin(plugin: LegacyStorePlugin | StorePlugin): plugin is LegacyStorePlugin { return 'artifact' in plugin; } @@ -44,7 +41,7 @@ const PluginCard: FC = ({ plugin }) => { > {/* TODO: abstract this messy focus hackiness into a custom component in lib */} { buttonRef.current!.focus(); @@ -68,15 +65,17 @@ const PluginCard: FC = ({ plugin }) => { boxSizing: 'border-box', }} > -
+
= ({ plugin }) => { }} > = ({ plugin }) => { }} >
isLegacyPlugin(plugin) @@ -179,6 +187,7 @@ const PluginCard: FC = ({ plugin }) => {