diff options
| author | AAGaming <aa@mail.catvibers.me> | 2022-08-26 01:18:28 -0400 |
|---|---|---|
| committer | AAGaming <aa@mail.catvibers.me> | 2022-08-26 01:18:28 -0400 |
| commit | d4d1c2bbabfcec3c62767e614c9d67f516938af2 (patch) | |
| tree | c30a7643507ade7200eff36e9c16d0512bb1edce /frontend/src/components/patchnotes/InlinePatchNotes.tsx | |
| parent | effc4ab0f56119041ac6efecdbf0a782714ec783 (diff) | |
| download | decky-loader-d4d1c2bbabfcec3c62767e614c9d67f516938af2.tar.gz decky-loader-d4d1c2bbabfcec3c62767e614c9d67f516938af2.zip | |
basic patch notes viewer, lazy-load settings and store, build frontend as esmodule, add lazy-loaded react-markdown, backend changes to accomodate ESModule frontend
Diffstat (limited to 'frontend/src/components/patchnotes/InlinePatchNotes.tsx')
| -rw-r--r-- | frontend/src/components/patchnotes/InlinePatchNotes.tsx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/frontend/src/components/patchnotes/InlinePatchNotes.tsx b/frontend/src/components/patchnotes/InlinePatchNotes.tsx new file mode 100644 index 00000000..84861c04 --- /dev/null +++ b/frontend/src/components/patchnotes/InlinePatchNotes.tsx @@ -0,0 +1,21 @@ +import { Focusable, updaterFieldClasses } from 'decky-frontend-lib'; +import { FunctionComponent, ReactNode } from 'react'; + +interface InlinePatchNotesProps { + date: ReactNode; + title: string; + children: ReactNode; + onClick?: () => void; +} + +const InlinePatchNotes: FunctionComponent<InlinePatchNotesProps> = ({ date, title, children, onClick }) => { + return ( + <Focusable className={updaterFieldClasses.PatchNotes} onActivate={onClick}> + <div className={updaterFieldClasses.PostedTime}>{date}</div> + <div className={updaterFieldClasses.EventDetailTitle}>{title}</div> + <div className={updaterFieldClasses.EventDetailsBody}>{children}</div> + </Focusable> + ); +}; + +export default InlinePatchNotes; |
