holy shit components are rendering whaaaaaaaaaaaaaaaat
This commit was merged in pull request #4.
This commit is contained in:
26
common/elements/v1/stacks/options.go
Normal file
26
common/elements/v1/stacks/options.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package stacks
|
||||
|
||||
import (
|
||||
"git.vezzani.net/ben/games/common/elements/v1"
|
||||
"git.vezzani.net/ben/games/common/elements/v1/blocks"
|
||||
)
|
||||
|
||||
type Option func(*Stack)
|
||||
|
||||
func BlockOpt(o blocks.Option) Option {
|
||||
return func(s *Stack) {
|
||||
o(&s.Block)
|
||||
}
|
||||
}
|
||||
|
||||
func Children(children ...elements.ElementFunc) Option {
|
||||
return func(s *Stack) {
|
||||
s.children = children
|
||||
}
|
||||
}
|
||||
|
||||
func Horizontal() Option {
|
||||
return func(s *Stack) {
|
||||
s.horizontal = true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user