File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ func AlignItems(alignItems options.AxisAlignmentType) Option {
1414 }
1515}
1616
17+ func AlignSelf (alignSelf options.AxisSizeType ) Option {
18+ return func () options.Option {
19+ return options .AlignSelf (alignSelf )
20+ }
21+ }
22+
1723func Alt (alt string ) Option {
1824 return func () options.Option {
1925 return options .Alt (alt )
Original file line number Diff line number Diff line change @@ -54,3 +54,9 @@ func MainAxisAlignment(mainAxisAlignment options.AxisAlignmentType) Option {
5454 column .opts = append (column .opts , div .AlignItems (mainAxisAlignment ))
5555 }
5656}
57+
58+ func MainAxisSize (mainAxisSize options.AxisSizeType ) Option {
59+ return func (column * column ) {
60+ column .opts = append (column .opts , div .AlignSelf (mainAxisSize ))
61+ }
62+ }
Original file line number Diff line number Diff line change @@ -54,3 +54,9 @@ func MainAxisAlignment(mainAxisAlignment options.AxisAlignmentType) Option {
5454 row .opts = append (row .opts , div .JustifyContent (mainAxisAlignment ))
5555 }
5656}
57+
58+ func MainAxisSize (mainAxisSize options.AxisSizeType ) Option {
59+ return func (row * row ) {
60+ row .opts = append (row .opts , div .AlignSelf (mainAxisSize ))
61+ }
62+ }
Original file line number Diff line number Diff line change 11package options
22
33type AxisAlignmentType string
4+ type AxisSizeType string
45type BorderStyleType string
56type DisplayType string
67type FlexDirectionType string
@@ -15,6 +16,11 @@ const (
1516 AxisAlignmentTypeBaseline AxisAlignmentType = "baseline"
1617)
1718
19+ const (
20+ AxisSizeTypeMax AxisSizeType = "stretch"
21+ AxisSizeTypeMin AxisSizeType = "start"
22+ )
23+
1824const (
1925 BorderStyleTypeSolid BorderStyleType = "solid"
2026 BorderStyleTypeDashed BorderStyleType = "dashed"
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ func AlignItems(alignItems AxisAlignmentType) Option {
2121 }
2222}
2323
24+ func AlignSelf (alignSelf AxisSizeType ) Option {
25+ return func (widget widget.BaseWidget ) {
26+ widget .UpdateStyleProperty ("align-self" , string (alignSelf ))
27+ }
28+ }
29+
2430func Alt (alt string ) Option {
2531 return func (widget widget.BaseWidget ) {
2632 widget .SetAttribute ("alt" , alt )
You can’t perform that action at this time.
0 commit comments