ButtonGroup accepts the layout-shape modifiers flexGrow(_:), flexShrink(_:), and alignSelf(_:) when it is a child of a FlexBox.
struct ButtonGroup: ViewComponentSerializable, FlexShapedComponent, Sendable
init
(
alignment
, content
)
|
Creates a button group with the buttons built using the result builder DSL.
Signature
public init( alignment: ButtonGroupAlignment, content: () -> [Button]) Parameters alignment: ButtonGroupAlignment
Alignment of the buttons within the group. Defaults to ButtonGroupAlignment.center.
|
alignment
: ButtonGroupAlignment |
Alignment of the buttons within the group.
|
alignSelf
: Alignment? |
Per-child cross-axis alignment override applied when this group is a child of a FlexBox.
|
buttons
: [Button] |
The buttons in this group.
|
flexGrow
: Float |
Flex-grow factor applied when this group is a child of a FlexBox.
|
flexShrink
: Float |
Flex-shrink factor applied when this group is a child of a FlexBox.
|
alignSelf
(
value
)
|
Overrides the cross-axis alignment for this button group.
Signature
public func alignSelf(_ value: Alignment) -> ButtonGroup Parameters _ value: AlignmentReturns ButtonGroup |
flexGrow
(
value
)
|
Sets the flex-grow factor for this button group.
Signature
public func flexGrow(_ value: Float) -> ButtonGroup Parameters _ value: FloatReturns ButtonGroup |
flexShrink
(
value
)
|
Sets the flex-shrink factor for this button group.
Signature
public func flexShrink(_ value: Float) -> ButtonGroup Parameters _ value: FloatReturns ButtonGroup |