summaryrefslogtreecommitdiff
path: root/frontend/src/components/patchnotes/InlinePatchNotes.tsx
blob: 84861c04baa37be797a8b80368b5ba05d436bb37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;