How to use the @cycle/dom.p function in @cycle/dom

To help you get started, we’ve selected a few @cycle/dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lucamezzalira / jsday-cycle-js / src / Main.js View on Github external
function getTrainData(data){
    return li(".train", [
        div(".train-data",
        [
            p(".stationName .col", [span("station: "), data.stationName]),
            p(".platform", [span("platform: "), data.platformName]),
            p(".current-location", [span("current location: "), data.currentLocation]),
            p(".arrival-time: ", [span("expected arrival time: "), moment(new Date(data.expectedArrival)).format("HH:MM - Do MMM YYYY")])
        ]
    )])
}
github ivan-kleshnin / cyclejs-examples / 3.0-crud / src / pages / user.create.js View on Github external
return div([
        h1("Create User"),
        menu({navi}),
        br(),
        div(".form-element", [
          label({htmlFor: "username"}, "Username:"),
          br(),
          input("#username", {type: "text", value: formatString(form.username), autocomplete: "off"}),
          p(errors.username),
        ]),
        div(".form-element", [
          label({htmlFor: "email"}, "Email:"),
          br(),
          input("#email", {type: "text", value: formatString(form.email), autocomplete: "off"}),
          p(errors.email),
        ]),
        div(".form-element", [
          label({htmlFor: "points"}, "Points:"),
          br(),
          input("#points", {type: "text", value: formatInteger(form.points), autocomplete: "off"}),
          p(errors.points),
        ]),
        div(".form-element", [
          label({htmlFor: "bonus"}, "Bonus:"),
          br(),
          input("#bonus", {type: "text", value: formatInteger(form.bonus), autocomplete: "off"}),
          p(errors.bonus),
        ]),
        button("#submit.form-element", {type: "submit", disabled: !model}, "Create"),
      ])
    }
github ivan-kleshnin / cyclejs-examples / 3.0-crud / src / pages / user.create.js View on Github external
label({htmlFor: "email"}, "Email:"),
          br(),
          input("#email", {type: "text", value: formatString(form.email), autocomplete: "off"}),
          p(errors.email),
        ]),
        div(".form-element", [
          label({htmlFor: "points"}, "Points:"),
          br(),
          input("#points", {type: "text", value: formatInteger(form.points), autocomplete: "off"}),
          p(errors.points),
        ]),
        div(".form-element", [
          label({htmlFor: "bonus"}, "Bonus:"),
          br(),
          input("#bonus", {type: "text", value: formatInteger(form.bonus), autocomplete: "off"}),
          p(errors.bonus),
        ]),
        button("#submit.form-element", {type: "submit", disabled: !model}, "Create"),
      ])
    }
  )
github ivan-kleshnin / cyclejs-examples / 3.0-crud.alt / src / pages / user.create.js View on Github external
label({htmlFor: "username"}, "Username:"),
          br(),
          input("#username", {type: "text", value: formatString(form.username), autocomplete: "off"}),
          p(errors.username),
        ]),
        div(".form-element", [
          label({htmlFor: "email"}, "Email:"),
          br(),
          input("#email", {type: "text", value: formatString(form.email), autocomplete: "off"}),
          p(errors.email),
        ]),
        div(".form-element", [
          label({htmlFor: "points"}, "Points:"),
          br(),
          input("#points", {type: "text", value: formatInteger(form.points), autocomplete: "off"}),
          p(errors.points),
        ]),
        div(".form-element", [
          label({htmlFor: "bonus"}, "Bonus:"),
          br(),
          input("#bonus", {type: "text", value: formatInteger(form.bonus), autocomplete: "off"}),
          p(errors.bonus),
        ]),
        button("#submit.form-element", {type: "submit", disabled: !model}, "Create"),
      ])
    }
  )
github cyclejs-community / cyclejs-sortable / examples / horizontal / src / index.ts View on Github external
DOM: sinks.DOM.map(dom =>
            div([h3('Horizontal too!'), p('this is running with RxJS'), dom])
        )
github pusher-community / cyclejs-realtime-chat / src / app.js View on Github external
].concat(pusherMessages.map(({ text, username, time }) => {
          return div({ className: 'message' }, [
            div({ className: 'avatar' }, [
              img({ attributes: { src: `https://twitter.com/${username}/profile_image?size=original` } })
            ]),
            div({ className: 'text-display' }, [
              div({ className: 'message-data' }, [
                span({ className: 'author' }, username),
                span({ className: 'timestamp' }, strftime('%H:%M:%S %P', new Date(time))),
                span({ className: 'seen' }),
              ]),
              p({ className: 'message-body' }, text)
            ])
          ])
        }))),
        div({ className: 'action-bar' }, [
github raquelxmoss / cycle-color-picker / src / view.js View on Github external
function renderInputSwitcher (state) {
  return (
    div('.input-switcher', [
      p('.switcher .up', [upArrow]),
      p('.switcher .down', [downArrow])
    ])
  );
}
github raquelxmoss / cycle-color-picker / src / view.js View on Github external
function renderInputSwitcher (state) {
  return (
    div('.input-switcher', [
      p('.switcher .up', [upArrow]),
      p('.switcher .down', [downArrow])
    ])
  );
}
github tryanzu / frontend / src / components / post / views / quickstartView.js View on Github external
div([
                    h3(
                        a([
                            'Preguntas frecuentes ',
                            span('.icon.icon-arrow-right'),
                        ])
                    ),
                    p(
                        'Antes de preguntar algo te pedimos consultar está sección para saber si alguien más ya ha resuelto esa duda.'
                    ),
                ]),
                div([
                    h3(
                        a(['Desarrollo Libre ', span('.icon.icon-arrow-right')])
                    ),
                    p(
                        'Anzu es una plataforma de código abierto escrita por apasionados del software! Te invitamos a conocer nuestra misión y unirte.'
                    ),
                ]),
            ]),
        ]),
    ]);
}
github cyclejs-community / typescript-starter-cycle / src / routes / Commits / routes / List / index.ts View on Github external
const content$ = loaded$.map(loaded =>
    loaded
      ? commitListItemDoms$.map(commits => ul(commits))
      : xs.of(p(['Loading...']))
    ).flatten();