Add missing documentation

This commit is contained in:
Alexandr Goncharov 2020-10-28 16:32:37 +03:00
parent 8785f8ae28
commit 81a485a0b1
2 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,9 @@ extension UICatalog.PreviewConfiguration {
UICatalog.PreviewConfiguration(themes: themes, contentSize: contentSize, size: newSize)
}
/// Sets the style of a single preview item
/// - Parameter itemStyle: item style
/// - Returns: updated configuration
public func with(itemStyle: PreviewItemStyle) -> UICatalog.PreviewConfiguration {
UICatalog.PreviewConfiguration(themes: self.themes,
contentSize: self.contentSize,

View File

@ -1,5 +1,6 @@
import SwiftUI
/// Single item style
@available(iOS 13, *)
public protocol PreviewItemStyle {
/// Creates a view that represents single item of a preview.
@ -13,6 +14,7 @@ public protocol PreviewItemStyle {
}
extension UICatalog {
/// Data passed to preview item rederer
@available(iOS 13, *)
public struct PreviewItemStyleConfiguration {
public let modelInfo: String