mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
21 lines
505 B
TypeScript
21 lines
505 B
TypeScript
|
import { useEffect } from 'preact/hooks';
|
||
|
import Apple2IO, { slot } from 'js/apple2io';
|
||
|
import VideotermImpl from 'js/cards/videoterm';
|
||
|
/**
|
||
|
* VideoTerm component properties
|
||
|
*/
|
||
|
export interface VideotermProps {
|
||
|
io: Apple2IO | undefined;
|
||
|
slot: slot;
|
||
|
}
|
||
|
|
||
|
export const Videoterm = ({ io, slot }: VideotermProps ) => {
|
||
|
useEffect(() => {
|
||
|
if (io) {
|
||
|
const videoterm = new VideotermImpl();
|
||
|
io.setSlot(slot, videoterm);
|
||
|
}
|
||
|
}, [io, slot]);
|
||
|
return null;
|
||
|
};
|