DoubleTextField SwiftUI - admiral-team/admiralui-ios GitHub Wiki
An object that displays two editable text fields
public struct DoubleTextField<T1, T2>: View where T1: TextFieldInput, T2: TextFieldInput
Complex element contains two textfield which inheritance class TextField. Also you can set width relation between textfields.
@State private var state: TextInputState = .normal
DoubleTextField(
firstTextField: StandardTextField($firstText, placeholder: "Placeholder", name: "Optional Label", state: $state),
secondTextField: StandardTextField($secondText, placeholder: "Placeholder", name: "Optional Label", state: $state),
alignment: .ratio(ration: 0.5),
info: "Info",
infoNumberOfLines: 1,
state: $state
)
@State private var state: TextInputState = .error
DoubleTextField(
firstTextField: StandardTextField($text, placeholder: "P1", name: "Optional Label", state: .constant(.normal)),
secondTextField: StandardTextField($textSecond, placeholder: "P2", name: "Optional Label", state: .constant(.normal)),
alignment: .ratio(ration: 0.7),
info: "Info",
infoNumberOfLines: 1,
state: .constant(.normal)
)
You can help us to find bugs or ask us to add features.
- To start
issue
please use ready-made templates. - To make changes to the repository, you need to create a
fork
of the project, make changes to the code and create apull request
in our project. You can read more about this in the Github documentation.