本文整理汇总了TypeScript中@cycle/dom.h2函数的典型用法代码示例。如果您正苦于以下问题:TypeScript h2函数的具体用法?TypeScript h2怎么用?TypeScript h2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了h2函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: div
.map(([backButton, contents]) =>
div([
backButton,
h2(`.${className}`, ['Details']),
hr(),
...contents
])
示例2: app
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')])]),
]),
),
};
}
示例3: Header
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')
])
)
}
示例4: div
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),
]),
示例5: homeView
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
)
)
)
])
])
]);
}
示例6: div
.map(([bmi, weightVTree, heightVTree]) =>
div([
weightVTree,
heightVTree,
h2('BMI is ' + bmi),
]),
示例7:
export const Home: RouteComponent = sources => ({
dom: xs.of(h2(['Home'])),
history: xs.empty()
});
示例8: div
.map(([count, incrementVTree, decrementVTree]) =>
div([
incrementVTree,
decrementVTree,
h2('Clicks: ' + count),
])