Skip to content

Commit 9229e37

Browse files
committed
refactor: update text size and punctuation in previews
Increase text size from 16 to 32 in the "Height diff" preview to enhance readability. Change "!" to "." for consistent punctuation in the "Punctuation Replacement" preview. These changes improve the design aesthetics and maintain consistency in visual presentations.
1 parent 915b24d commit 9229e37

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Sources/TextDiff/TextDiffView.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public struct TextDiffView: View {
130130
}
131131

132132
#Preview("Height diff") {
133-
let font: NSFont = .systemFont(ofSize: 16, weight: .regular)
133+
let font: NSFont = .systemFont(ofSize: 32, weight: .regular)
134134
let style = TextDiffStyle(
135135
additionsStyle: TextDiffChangeStyle(
136136
fillColor: .systemGreen.withAlphaComponent(0.28),
@@ -152,16 +152,15 @@ public struct TextDiffView: View {
152152
)
153153
ZStack(alignment: .topLeading) {
154154
Text("Add ed a diff view. It looks good! Add ed a diff view. It looks good!")
155-
.font(.system(size: 16, weight: .regular, design: nil))
155+
.font(.system(size: 32, weight: .regular, design: nil))
156156
.foregroundStyle(.red.opacity(0.7))
157157

158158
TextDiffView(
159-
original: "Add ed a diff view. It looks good! Add ed a diff view. It looks good!",
159+
original: "Add ed a diff view. It looks good! Add ed a diff view. It looks good.",
160160
updated: "Add ed a diff view. It looks good! Add ed a diff view. It looks good!",
161161
style: style,
162162
mode: .character
163163
)
164164
}
165165
.padding()
166-
.frame(width: 320)
167166
}

0 commit comments

Comments
 (0)