Last active
October 2, 2019 16:07
-
-
Save gwennguihal/cba12a15b5537b940cf22bae7f633b35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lazy var dataSource = DataSource { | |
| Section { | |
| LabelCell(HeaderAdapter(label: "Example")) | |
| Spacer(32) | |
| } | |
| model.items.ui.map { item in | |
| Section { | |
| Spacer() | |
| LabelCell(TitleAdapter(label: item.title)) | |
| item.subTitle.ui.map { | |
| Spacer() | |
| LineCell() | |
| LabelCell(SubtitleAdapter(label: $0)) | |
| .onDidSelect(self.onDidSelect(subtitleCell:)) | |
| } | |
| Spacer() | |
| item.colors.ui.map { | |
| ContentCell(ContentAdapter(color: $0)) | |
| .onDidSelect { print($0.adapter.color) } | |
| } | |
| Spacer(16) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment