Skip to content

Commit 61c8b04

Browse files
committed
feat(Markdown): Add Link class to a tag for a mentain a Steam UI colors palette
1 parent 8c24c52 commit 61c8b04

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

frontend/src/components/Markdown.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Focusable, Navigation } from '@decky/ui';
1+
import { Focusable, Navigation, findClass, findClassByName } from '@decky/ui';
22
import { FunctionComponent, useRef } from 'react';
33
import ReactMarkdown, { Options as ReactMarkdownOptions } from 'react-markdown';
44
import remarkGfm from 'remark-gfm';
@@ -8,6 +8,9 @@ interface MarkdownProps extends ReactMarkdownOptions {
88
}
99

1010
const Markdown: FunctionComponent<MarkdownProps> = (props) => {
11+
const eventDetailsBodyClassName = findClassByName('EventDetailsBody') || undefined;
12+
const eventLinkClassName = findClass('43088', 'Link');
13+
1114
return (
1215
<Focusable>
1316
<ReactMarkdown
@@ -25,8 +28,10 @@ const Markdown: FunctionComponent<MarkdownProps> = (props) => {
2528
Navigation.NavigateToExternalWeb(aRef.current!.href);
2629
}}
2730
style={{ display: 'inline' }}
31+
focusClassName="steam-focus"
32+
className={eventDetailsBodyClassName}
2833
>
29-
<a ref={aRef} {...nodeProps.node.properties}>
34+
<a ref={aRef} {...nodeProps.node.properties} className={eventLinkClassName}>
3035
{nodeProps.children}
3136
</a>
3237
</Focusable>

0 commit comments

Comments
 (0)