mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
e525e12c3c
* React hook linter * React linting * Simplify config
26 lines
535 B
TypeScript
26 lines
535 B
TypeScript
import { h, Ref } from 'preact';
|
|
|
|
/**
|
|
* Screen properties
|
|
*/
|
|
export interface ScreenProps {
|
|
screen: Ref<HTMLCanvasElement>;
|
|
}
|
|
|
|
/**
|
|
* Styled canvas element that the Apple II display is
|
|
* rendered to by VideoModes.
|
|
*
|
|
* @param screen Canvas element reference
|
|
* @returns
|
|
*/
|
|
export const Screen = ({ screen }: ScreenProps) => {
|
|
return (
|
|
<div id="display">
|
|
<div className="overscan">
|
|
<canvas id="screen" width="592" height="416" ref={screen} />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|