Skip to content

Commit

Permalink
Add FXIOS-9150 [New Close Button] documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tushar Chitnavis committed Jun 7, 2024
1 parent a558083 commit 2b08c2e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Buildings blocks are classes uses by devs to enabled General or Feature componen

- ``BottomSheetViewController``
- ``CardView``
- ``CloseButton``
- ``CollapsibleCardView``
- ``ContextualHintView``
- ``LinkButton``
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ``ComponentLibrary/CloseButton``

The button which is used for closing a window.

## Overview

The `CloseButton` is a subclass of the `UIButton`. This means properties of the `UIButton` are accessible, but for easy conveniance it's recommended to configure the button title, font and accessibility identifier through it's' view model ``CloseButtonViewModel``. The button size shouldn't be adjusted and should be used as is.

## Illustration

> This image is illustrative only. For precise examples of iOS implementation, please run the SampleApplication.
@TabNavigator {
@Tab("Light") {
![The CloseButton on iOS](CloseButton)
}

@Tab("Dark") {
![The CloseButton Dark on iOS](CloseButton-dark)
}
}

## Topics

### View Model

- ``CloseButtonViewModel``
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct BottomSheetComponentViewModel: ComponentViewModel {
private var viewModel: BottomSheetViewModel

init() {
viewModel = BottomSheetViewModel(closeButtonA11yLabel: "Close button")
viewModel = BottomSheetViewModel(closeButtonA11yLabel: "Close button", closeButtonA11yIdentifier: "a11yCloseButton")
viewModel.shouldDismissForTapOutside = true

viewController = BottomSheetViewController(
Expand Down

0 comments on commit 2b08c2e

Please sign in to comment.