Components
Consistent spacing between buttons.
ButtonRow
should be used to display two Buttons
side-by-side. The ButtonRow
should fill the readable content width of the screen, and its distribution should be used to define the layout of the buttons within it.
A ButtonRow
’s distribution determines both the size and position of its buttons. ButtonRow.Distribution
is an enum with three cases:
Left & right buttons each use 50% of the total space.
Left button is given enough space to fit its content, and right button takes up the remaining space.
Left & right buttons are each given enough space to fit their content, but with the additional restriction that the right button never be smaller than the left button.
public init(leftButton: Button, rightButton: Button, distribution: Button.Distribution = .emphasis)
Creates and returns a new button row with the specified buttons and distribution.
public let leftButton: Button
Button to be shown on the left, should typically have either a secondary or tertiary button style.
public let rightButton: Button
Button to be shown on the right, should typically have primary button style.
public var distribution: Button.Distribution
Enum specifying how the buttons should be distributed along the horizontal axis.