Adds an app skeleton. Still needs some work.

This commit is contained in:
Jason Miller
2018-03-12 23:03:31 -04:00
parent 619080f85a
commit e691ec9580
28 changed files with 1826 additions and 917 deletions

View File

@@ -0,0 +1,36 @@
import { h, Component } from 'preact';
// import Button from 'preact-material-components/Button';
// import Switch from 'preact-material-components/Switch';
// import 'preact-material-components/Switch/style.css';
import * as style from './style.scss';
type Props = {
files: {
data: any
}[]
};
type State = {
active: boolean
};
export default class Home extends Component<Props, State> {
state: State = {
active: false
};
componentDidMount() {
setTimeout( () => {
this.setState({ active: true });
});
}
render({ files }, { active }) {
return (
<div class={style.home+' '+(active ? style.active : '')}>
{ files && files[0] && (
<img src={files[0].data} />
) }
</div>
);
}
}