Update RiotSwiftUI symbols to triple slash documentation style with function annotations.

This commit is contained in:
David Langley
2021-09-13 11:36:33 +01:00
parent 886bb98eb1
commit 3d65fbd48f
39 changed files with 184 additions and 240 deletions
@@ -31,25 +31,21 @@ extension EnvironmentValues {
}
}
/**
A theme modifier for setting the theme for this view and all its descendants in the hierarchy.
- Parameters:
- theme: a Theme to be set as the environment value.
*/
@available(iOS 14.0, *)
extension View {
/// A theme modifier for setting the theme for this view and all its descendants in the hierarchy.
/// - Parameter theme: A theme to be set as the environment value.
/// - Returns: The target view with the theme applied.
func theme(_ theme: ThemeSwiftUI) -> some View {
environment(\.theme, theme)
}
}
/**
A theme modifier for setting the theme by id for this view and all its descendants in the hierarchy.
- Parameters:
- themeId: ThemeIdentifier of a theme to be set as the environment value.
*/
@available(iOS 14.0, *)
extension View {
/// A theme modifier for setting the theme by id for this view and all its descendants in the hierarchy.
/// - Parameter themeId: ThemeIdentifier of a theme to be set as the environment value.
/// - Returns: The target view with the theme applied.
func theme(_ themeId: ThemeIdentifier) -> some View {
return environment(\.theme, themeId.themeSwiftUI)
}