Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABW-1386 Edit Persona Fix #481

Merged
merged 2 commits into from
May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Sources/Core/DesignSystem/Components/AppTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,15 @@ public struct AppTextField<FocusValue: Hashable, Accessory: View>: View {
public var body: some View {
HStack(alignment: .textFieldAlignment, spacing: 0) {
VStack(alignment: .leading, spacing: .small2) {
HStack {
HStack(spacing: 0) {
if let primaryHeading {
Text(primaryHeading)
.textStyle(.body1HighImportance)
.foregroundColor(.app.gray1)
.foregroundColor(accentColor)
.multilineTextAlignment(.leading)
}

if primaryHeading != nil || secondaryHeading != nil {
Spacer(minLength: 0)
}
Spacer(minLength: 0)

if let secondaryHeading {
Text(secondaryHeading)
Expand Down Expand Up @@ -104,7 +102,7 @@ public struct AppTextField<FocusValue: Hashable, Accessory: View>: View {
.cornerRadius(.small2)
.overlay(
RoundedRectangle(cornerRadius: .small2)
.stroke(borderColor, lineWidth: 1)
.stroke(accentColor, lineWidth: 1)
)
.alignmentGuide(.textFieldAlignment, computeValue: { $0[VerticalAlignment.center] })

Expand All @@ -116,7 +114,7 @@ public struct AppTextField<FocusValue: Hashable, Accessory: View>: View {
}
}

private var borderColor: Color {
private var accentColor: Color {
switch hint?.kind {
case .none:
return .app.gray1
Expand Down