-
Notifications
You must be signed in to change notification settings - Fork 0
/
Theme.swift
50 lines (41 loc) · 1.19 KB
/
Theme.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import SwiftUI
public struct Theme {
public struct Title {
/// Font used by the message title
public var font: Font
/// Text color of the message title
public var color: Color
}
public struct Body {
/// Font used by the message body
public var font: Font
/// Text color of the message body
public var color: Color
}
public struct Action {
/// Font used for the title of the action buttons
public var font: Font
}
/// Theme configuration of the message title
public var title: Title
/// Theme configuration of the message body
public var body: Body
/// Theme configuration of the actions
public var action: Action
}
public extension Theme {
/// Default theme unless something different is configured
static let standard = Theme(
title: .init(
font: Font.system(size: 34, weight: .bold),
color: Color(UIColor.label)
),
body: .init(
font: Font.system(size: 19, weight: .medium),
color: Color.gray
),
action: .init(
font: .system(size: 19, weight: .medium)
)
)
}