Add layout components 0001-0025
Stack through StickyHeader, with behavior tests and gallery demos. kit gains Arrive, Settle (paint-time layout check) and Shade. Several actions return named ui.Element results; mygo vet forbids elements in structs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b34562333b
commit
4efaf2680f
41 files changed
+1765
-11
No files matched your search
@@ -0,0 +1,10 @@
|
||||
package layout
|
||||
|
||||
import "github.com/egoist/mygo/ui"
|
||||
|
||||
// Panel is a bordered surface box; its size animates.
|
||||
func Panel(c *ui.Context, content func()) ui.Element {
|
||||
t := c.Theme()
|
||||
return ui.Column(c).Gap(t.Space(2)).Padding(t.Space(4)).Background(t.Surface).Border(1, t.Border).
|
||||
Radius(t.Radius).Transition(ui.ElementTransition{Size: true}).Children(content)
|
||||
}
|
||||
Reference in new issue
Block a user