feat(chat): 대화 날짜 구분선을 연결한다
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
import SwiftUI
|
||||
|
||||
struct UserCreatorChatDateSeparatorView: View {
|
||||
@Environment(\.locale) private var locale
|
||||
|
||||
let title: String
|
||||
|
||||
var body: some View {
|
||||
Text(title)
|
||||
.font(dateFont)
|
||||
.foregroundColor(Color.gray400)
|
||||
.multilineTextAlignment(.center)
|
||||
.lineLimit(nil)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.frame(maxWidth: .infinity)
|
||||
.accessibilityElement(children: .ignore)
|
||||
.accessibilityLabel(Text(title))
|
||||
}
|
||||
|
||||
private var dateFont: SwiftUI.Font {
|
||||
if let fontName = SodaTypography.caption3.localizedFontName(locale: locale) {
|
||||
return .custom(fontName, size: SodaTypography.caption3.size, relativeTo: .caption)
|
||||
}
|
||||
return .system(.caption, design: .default, weight: SodaTypography.caption3.weight)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user