docs: colors, views, and string
This commit is contained in:
parent
3b0834a87a
commit
6017cd29d9
|
@ -1,9 +1,14 @@
|
|||
import SwiftUI
|
||||
|
||||
/// View with a colored background
|
||||
public struct BackgroundView<Content: View>: 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
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
import UIKit
|
||||
import SwiftUI
|
||||
|
||||
/// Additional colors used by the package
|
||||
public extension Color {
|
||||
|
||||
static var background: Color {
|
Loading…
Reference in New Issue