File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ indirect enum Tag {
8383 node = node. fontWeight ( fontWeight)
8484 }
8585 if let color = style. color {
86- node = node. color ( color)
86+ node = node. foregroundColor ( color)
8787 }
8888 return node
8989 case . newline:
@@ -330,7 +330,7 @@ extension Tag {
330330 if let family = attributes [ " family " ] ,
331331 let sizeString = attributes [ " size " ] ,
332332 let size = NumberFormatter ( ) . number ( from: sizeString) ? . floatValue {
333- font = Font . custom ( family, size: Length ( size) )
333+ font = Font . custom ( family, size: CGFloat ( size) )
334334 }
335335 let style = AttributedStringStyle ( font: font, color: color)
336336 return . font( style: style, child: content)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ struct ContentView : View {
1212 @State var string : String = " Type some text here... "
1313 var body : some View {
1414 HStack {
15- TextField ( $string)
15+ TextField ( " TEXT " , text : $string)
1616 . lineLimit ( nil )
1717 AttributedText ( formatted: string)
1818 }
You can’t perform that action at this time.
0 commit comments