chore(compose): Update ALT input to reflect Figma design
This commit is contained in:
parent
61465a8f9f
commit
a0a8a28c88
|
@ -46,16 +46,32 @@ public struct AttachmentView: View {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
Spacer()
|
Spacer()
|
||||||
TextField("", text: $viewModel.caption)
|
ZStack(alignment: .bottom) {
|
||||||
.lineLimit(1)
|
Rectangle()
|
||||||
.textFieldStyle(.plain)
|
.fill(
|
||||||
.foregroundColor(.white).padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 4))
|
LinearGradient(
|
||||||
.background(Color.black.opacity(0.4))
|
colors: [.black.opacity(0.0), .black.opacity(1.0)],
|
||||||
.placeholder(when: viewModel.caption.isEmpty) {
|
startPoint: .top,
|
||||||
Text(placeholder).foregroundColor(.white).padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 4))
|
endPoint: .bottom
|
||||||
.lineLimit(1)
|
)
|
||||||
}
|
)
|
||||||
.padding(EdgeInsets(top: 6, leading: 0, bottom: 10, trailing: 0))
|
.frame(height: 80)
|
||||||
|
|
||||||
|
TextField("", text: $viewModel.caption)
|
||||||
|
.lineLimit(1)
|
||||||
|
.textFieldStyle(.plain)
|
||||||
|
.font(.footnote)
|
||||||
|
.foregroundColor(Color(UIColor.white.withAlphaComponent(0.8)))
|
||||||
|
.padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 4))
|
||||||
|
.placeholder(when: viewModel.caption.isEmpty) {
|
||||||
|
Text(placeholder)
|
||||||
|
.font(.footnote)
|
||||||
|
.foregroundColor(Color(UIColor.white.withAlphaComponent(0.8)))
|
||||||
|
.padding(EdgeInsets(top: 0, leading: 8, bottom: 0, trailing: 4))
|
||||||
|
.lineLimit(1)
|
||||||
|
}
|
||||||
|
.padding(EdgeInsets(top: 6, leading: 0, bottom: 10, trailing: 0))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue