mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 07:52:03 +00:00
* fix(Updater): Remove `FocusRing` component and use `Focusable` instead * feat(Markdown): Add Link `class` to a tag for a mentain a Steam UI colors palette
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Focusable, Navigation } from '@decky/ui';
|
||||
import { Focusable, Navigation, findClass, findClassByName } from '@decky/ui';
|
||||
import { FunctionComponent, useRef } from 'react';
|
||||
import ReactMarkdown, { Options as ReactMarkdownOptions } from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
@@ -8,6 +8,9 @@ interface MarkdownProps extends ReactMarkdownOptions {
|
||||
}
|
||||
|
||||
const Markdown: FunctionComponent<MarkdownProps> = (props) => {
|
||||
const eventDetailsBodyClassName = findClassByName('EventDetailsBody') || undefined;
|
||||
const eventLinkClassName = findClass('43088', 'Link');
|
||||
|
||||
return (
|
||||
<Focusable>
|
||||
<ReactMarkdown
|
||||
@@ -25,8 +28,10 @@ const Markdown: FunctionComponent<MarkdownProps> = (props) => {
|
||||
Navigation.NavigateToExternalWeb(aRef.current!.href);
|
||||
}}
|
||||
style={{ display: 'inline' }}
|
||||
focusClassName="steam-focus"
|
||||
className={eventDetailsBodyClassName}
|
||||
>
|
||||
<a ref={aRef} {...nodeProps.node.properties}>
|
||||
<a ref={aRef} {...nodeProps.node.properties} className={eventLinkClassName}>
|
||||
{nodeProps.children}
|
||||
</a>
|
||||
</Focusable>
|
||||
|
||||
Reference in New Issue
Block a user