summaryrefslogtreecommitdiff
path: root/frontend/src/components/patchnotes/InlinePatchNotes.tsx
blob: cf25efcb35b06ac9b62af5e66252a81845ca53d4 (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/ui';
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;