Closed jeffgrann closed 3 years ago
Hi, @jeffgrann thank you so much for checking out the library, Instead of using the Text(
try using StepTextView(text:
which aligns as expected.
Below is the code
let steps = [ StepTextView(text: "Cart"),
StepTextView(text: "Delivery Address"),
StepTextView(text: "Order Summary"),
StepTextView(text: "Payment Method"),
StepTextView(text: "Track")]
let indicationTypes = [StepperIndicationType.custom(NumberedCircleView(text: "1")),
.custom(NumberedCircleView(text: "2")),
.custom(NumberedCircleView(text: "3")),
.custom(NumberedCircleView(text: "4")),
.custom(NumberedCircleView(text: "5"))]
var body: some View {
StepperView()
.addSteps(steps)
.indicators(indicationTypes)
.stepIndicatorMode(StepperMode.vertical)
.spacing(50)
.lineOptions(StepperLineOptions.custom(1, Colors.blue(.teal).rawValue))
}
Thanks!
Describe the bug Display issue with the first and last steps when displayed vertically where the indicator and text is indented to the right from the line.
To Reproduce Use the code from the readme and change .horizontal to .vertical:
Expected behavior Indicators should line up.
Screenshots
Info (please complete the following information):
Additional context N/A