apple2js/js/components/Header.tsx
Will Scullin 303838f63d
Use CSS modules (#123)
* Use CSS modules

* Fix tests

* Feedback
2022-06-03 15:30:39 -07:00

31 lines
735 B
TypeScript

import { h } from 'preact';
import styles from './css/Header.module.css';
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>
);
};