.map(([backButton, contents]) => div([ backButton, h2(`.${className}`, ['Details']), hr(), ...contents ])
function app() { return { html: xs.of( h('.test-element', [ div([h2('.a', 'a'), h('h4.b', 'b'), h('h1.fooclass')]), div([h3('.c', 'c'), h('div', [h('p.d', 'd'), h('h2.barclass')])]), ]), ), }; }
export default function Header(): Stream<VNode> { return xs.of( header('.main-header', {}, [ // Profile picture // Contact information h1('.my-name', {}, 'Michal Vanko'), h2('.job-title', {}, 'Software developer') ]) ) }
const vdom$ = name$.map(name => div([ p([ 'First name', input('.first', { attrs: { type: 'text' } }), ]), p([ 'Last name', input('.last', { attrs: { type: 'text' } }), ]), h2('Hello ' + name), ]),
function homeView(projects: Project[]): VNode { return div(".welcome", [ h1("Helix Pi"), div(".options", [ a(".new-project", "Create new project"), div(".recent-projects", [ h2("Recent projects"), div( ".projects.flex-column", projects.map(project => a( ".goto-project", { attrs: { href: `/project/${project.id}` } }, project.name ) ) ) ]) ]) ]); }
.map(([bmi, weightVTree, heightVTree]) => div([ weightVTree, heightVTree, h2('BMI is ' + bmi), ]),
export const Home: RouteComponent = sources => ({ dom: xs.of(h2(['Home'])), history: xs.empty() });
.map(([count, incrementVTree, decrementVTree]) => div([ incrementVTree, decrementVTree, h2('Clicks: ' + count), ])
const vdom$ = content$.map(content => div([ h2('Commits List'), content ])
export const About: RouteComponent = sources => ({ dom: xs.of(h2(['About'])), history: xs.empty() });