コンポーネント詳細
Span
Inline span node helper and props variant for text fragments.
サンプル
参照情報
- テンプレート
frontend/ui_impl.go- ゴールデン
N/A
Go(Marionette)サンプル
この実装例は Go の Marionette を使っています。ソース: docs/site-astro/public/examples/go/span.go
package goexamples
import (
mb "github.com/YoshihideShirai/marionette/backend"
mf "github.com/YoshihideShirai/marionette/frontend"
)
func RegisterSpanExample(app *mb.App) {
app.Page("/span", func(ctx *mb.Context) mf.Node {
return mf.Stack(mf.StackProps{Direction: "horizontal", Gap: "none"},
mf.TextComponent(mf.TextProps{Text: "Inline"}),
mf.TextComponent(mf.TextProps{Text: " text helper"}),
)
})
}