Last active
April 19, 2023 00:19
-
-
Save naturalwarren/3f2f5729e5b64917824d77e64a39863e to your computer and use it in GitHub Desktop.
DataRow+ViewModelConvertible
This file contains 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
extension DataRow: ViewModelConvertible { | |
func viewModel(context: SDUIContext) -> some ViewModel { | |
return DataRowViewModel( | |
title: self.title, | |
titleURL: self.titleHyperlink, | |
subtitle: self.subtitle, | |
layout: self.layout.toNativeLayout(), | |
accessory: accessoryView?.viewModel(context: context) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment