コンポーネント詳細

Section

Section block with consistent heading spacing.

サンプル

参照情報

テンプレート
templates/components/section.html
ゴールデン
testdata/golden/section.golden.html

Go(Marionette)サンプル

この実装例は Go の Marionette を使っています。ソース: docs/site-astro/public/examples/go/section.go

package goexamples

import (
	mb "github.com/YoshihideShirai/marionette/backend"
	mf "github.com/YoshihideShirai/marionette/frontend"
)

func RegisterSectionExample(app *mb.App) {
	app.Page("/section", func(ctx *mb.Context) mf.Node {
		return mf.Section(mf.SectionProps{
			Title:       "Details",
			Description: "Supporting information for the current workflow.",
		}, mf.TextComponent(mf.TextProps{Text: "Section body"}))
	})
}