AdmiralSwiftUI InfoAgreementView - admiral-team/admiralui-ios GitHub Wiki

Overview

InfoAgreementView - The component is used to inform users with the option to select in the checkBox. And also three interaction buttons.

Code

public var body: some View {
 InfoAgreementView(
     title: "Title",
     isSelected: .constant(true),
     isLoading: .constant(false),
     subtitleButtonTitle: "SubtitleButtonTitle",
     subtitleButtonAction: {},
     buttonTitle: "Action",
     buttonAction: {},
     additionalButtonTitle: "Additional action",
     additionalButtonAction: {})
}
}

You can create a InfoAgreementView by specifying the following parameters in the initializer

- isSelected: Bool - Flag select checkBox.
- title: String - The text that the title label displays.
- subtitleButtonTitle: String? - The text that the subtitle button displays.
- subtitleButtonAction: () -> () - Action subtitleButton.
- buttonTitle: String? - The text that the button displays.
- isLoading: Bool - Flag loading button.
- buttonAction: () -> () - Action button.
- additionalButtonTitle: String? - The text that the additionalButtonTitle displays.
- additionalButtonAction: () -> () - Action additionalButtonAction.

Live Example

To run live demo with InfoAgreementView open Xcode and run project with Example target. Then in the main page -> InfoAgreementView:

Contribution

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 a pull request in our project. You can read more about this in the Github documentation.