a new approach for the ui

This commit is contained in:
Danny Coates 2018-10-24 19:07:10 -07:00
parent cc85486414
commit f0cfc19f8c
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
34 changed files with 2246 additions and 146 deletions

21
app/ui/header.js Normal file
View file

@ -0,0 +1,21 @@
const html = require('choo/html');
const account = require('./account');
module.exports = function(state, emit) {
const header = html`
<header class="flex-none flex flex-row items-center bg-white w-full px-4 h-12 shadow-md justify-between">
<a
class="header-logo"
href="/">
<h1 class="text-black font-normal">Firefox <b>Send</b></h1>
</a>
${account(state, emit)}
</header>`;
// HACK
// We only want to render this once because we
// toggle the targets of the links with utils/openLinksInNewTab
// header.isSameNode = function(target) {
// return target && target.nodeName && target.nodeName === 'HEADER';
// };
return header;
};