.map(([backButton, contents]) =>
   div([
     backButton,
     h2(`.${className}`, ['Details']),
     hr(),
     ...contents
   ])
Example #2
0
 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')])]),
       ]),
     ),
   };
 }
Example #3
0
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')
        ])
    )
}
Example #4
0
 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),
   ]),
Example #5
0
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
            )
          )
        )
      ])
    ])
  ]);
}
Example #6
0
 .map(([bmi, weightVTree, heightVTree]) =>
   div([
     weightVTree,
     heightVTree,
     h2('BMI is ' + bmi),
   ]),
export const Home: RouteComponent = sources => ({
  dom: xs.of(h2(['Home'])),
  history: xs.empty()
});
Example #8
0
      .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()
});