Versions in this module Expand all Collapse all v0 v0.2.546 Jan 29, 2024 Changes in this version + func NewHandler(name string, f interface{}, args ...Arg) http.Handler + type Arg struct + Control interface{} + Get func(q url.Values) interface{} + Name string + Value interface{} + func BooleanArg(name string, value bool) Arg + func FloatArg(name string, value float64, min, max, step float64) Arg + func IntArg(name string, value int, conf IntArgConf) Arg + func ObjectArg(name string, value interface{}, valuePtr interface{}) Arg + func TextArg(name, value string) Arg + type Conf struct + ArgTypes *SortedMap + Args *SortedMap + Parameters StoryParameters + Stories []Story + Title string + func NewConf(title string, args ...Arg) *Conf + func (c *Conf) AddStory(name string, args ...Arg) + type IntArgConf struct + Max *int + Min *int + Step *int + type SortedMap struct + func NewSortedMap() *SortedMap + func (sm *SortedMap) Add(key string, value interface{}) + func (sm *SortedMap) MarshalJSON() (output []byte, err error) + type Story struct + Args *SortedMap + Name string + type StoryParameters struct + Server map[string]interface{} + type Storybook struct + Config map[string]*Conf + Handlers map[string]http.Handler + Header string + Log *zap.Logger + Path string + RoutePrefix string + Server http.Server + StaticHandler http.Handler + func New(conf ...StorybookConfig) *Storybook + func (sh *Storybook) AddComponent(name string, componentConstructor interface{}, args ...Arg) + func (sh *Storybook) Build(ctx context.Context) (err error) + func (sh *Storybook) ListenAndServeWithContext(ctx context.Context) (err error) + func (sh *Storybook) ServeHTTP(w http.ResponseWriter, r *http.Request) + type StorybookConfig func(*Storybook) + func WithHeader(header string) StorybookConfig + func WithServerAddr(addr string) StorybookConfig