mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
9173bff1ba
Restrict element types and global styling to improve embedability
31 lines
736 B
TypeScript
31 lines
736 B
TypeScript
import { h } from 'preact';
|
|
|
|
import styles from './css/Header.module.scss';
|
|
|
|
const README = 'https://github.com/whscullin/apple2js#readme';
|
|
|
|
/**
|
|
* Header component properties.
|
|
*/
|
|
export interface HeaderProps {
|
|
e: boolean;
|
|
}
|
|
|
|
/**
|
|
* Header component, which consists of a badge and title.
|
|
*
|
|
* @returns Header component
|
|
*/
|
|
export const Header = ({ e }: HeaderProps) => {
|
|
return (
|
|
<div className={styles.header}>
|
|
<a href={README} rel="noreferrer" target="_blank">
|
|
<img src="img/badge.png" className={styles.badge} />
|
|
</a>
|
|
<div className={styles.subtitle}>
|
|
An Apple {e ? '//e' : ']['} Emulator in JavaScript
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|