fix(plugin): use Focusable for compact styled View Details button
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState, useRef } from "react"
|
import { useEffect, useState, useRef } from "react"
|
||||||
import { PanelSectionRow, ButtonItem, staticClasses } from "@decky/ui"
|
import { PanelSectionRow, Focusable, staticClasses } from "@decky/ui"
|
||||||
import { Router } from "@decky/ui"
|
import { Router } from "@decky/ui"
|
||||||
import {
|
import {
|
||||||
fetchPluginGame,
|
fetchPluginGame,
|
||||||
@@ -130,12 +130,20 @@ export default function LibraryAppPanel({ appId, title, hardwareSlug, baseUrl }:
|
|||||||
{detectedSlug ? detectedSlug : <span style={{ color: "#e0a030" }}>⚠ global</span>}
|
{detectedSlug ? detectedSlug : <span style={{ color: "#e0a030" }}>⚠ global</span>}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
{/* View Details — compact, gamepad-navigable */}
|
{/* View Details — compact, gamepad-navigable via Focusable */}
|
||||||
<span style={{ flexShrink: 0 }}>
|
<Focusable onClick={() => openExternalUrl(gameUrl)} style={{ flexShrink: 0 }}>
|
||||||
<ButtonItem layout="below" onClick={() => openExternalUrl(gameUrl)}>
|
<span style={{
|
||||||
|
display: "inline-block",
|
||||||
|
fontSize: "12px",
|
||||||
|
padding: "4px 12px",
|
||||||
|
borderRadius: "6px",
|
||||||
|
background: "rgba(255,255,255,0.08)",
|
||||||
|
border: "1px solid rgba(255,255,255,0.12)",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
}}>
|
||||||
View Details
|
View Details
|
||||||
</ButtonItem>
|
|
||||||
</span>
|
</span>
|
||||||
|
</Focusable>
|
||||||
</div>
|
</div>
|
||||||
</PanelSectionRow>
|
</PanelSectionRow>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user