apple2js/js/components/Header.tsx
Will Scullin 9173bff1ba
Switch to scss, better scope rules (#170)
Restrict element types and global styling to improve embedability
2023-01-11 18:14:44 -08:00

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>
);
};