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