From 6017cd29d96c894e7751d1426b4abd9c455c2c3b Mon Sep 17 00:00:00 2001 From: greyder Date: Sun, 5 Jun 2022 11:53:32 +0800 Subject: [PATCH] docs: colors, views, and string --- .../{String+Extension.swift => String+Validators.swift} | 0 Sources/CoffeeUI/BackgroundView.swift | 7 ++++++- .../{Color+Extension.swift => Color+Defaults.swift} | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) rename Sources/CoffeeBeans/{String+Extension.swift => String+Validators.swift} (100%) rename Sources/CoffeeUI/{Color+Extension.swift => Color+Defaults.swift} (90%) diff --git a/Sources/CoffeeBeans/String+Extension.swift b/Sources/CoffeeBeans/String+Validators.swift similarity index 100% rename from Sources/CoffeeBeans/String+Extension.swift rename to Sources/CoffeeBeans/String+Validators.swift diff --git a/Sources/CoffeeUI/BackgroundView.swift b/Sources/CoffeeUI/BackgroundView.swift index b675971..86784de 100644 --- a/Sources/CoffeeUI/BackgroundView.swift +++ b/Sources/CoffeeUI/BackgroundView.swift @@ -1,9 +1,14 @@ import SwiftUI +/// View with a colored background public struct BackgroundView: View { let color: Color var content: () -> Content - + + /// Create a View with a background color + /// - Parameters: + /// - color: background color + /// - content: view over the background color public init(color: Color = .background, @ViewBuilder content: @escaping () -> Content) { self.color = color self.content = content diff --git a/Sources/CoffeeUI/Color+Extension.swift b/Sources/CoffeeUI/Color+Defaults.swift similarity index 90% rename from Sources/CoffeeUI/Color+Extension.swift rename to Sources/CoffeeUI/Color+Defaults.swift index 340994f..31dcfc7 100644 --- a/Sources/CoffeeUI/Color+Extension.swift +++ b/Sources/CoffeeUI/Color+Defaults.swift @@ -8,6 +8,7 @@ import UIKit import SwiftUI +/// Additional colors used by the package public extension Color { static var background: Color {