File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,38 @@ struct StackPlayground: View {
6565 Text ( " Text2 TA " )
6666 }
6767 . border ( Color . blue)
68+ Text ( " HStack firstTextBaseline (mixed sizes): " ) . bold ( )
69+ HStack ( alignment: . firstTextBaseline, spacing: 8 ) {
70+ Text ( " Big " )
71+ . font ( . title)
72+ Text ( " Small " )
73+ . font ( . footnote)
74+ . foregroundStyle ( . secondary)
75+ }
76+ . padding ( 8 )
77+ . border ( Color . blue)
78+ Text ( " HStack firstTextBaseline (multi-line + single line): " ) . bold ( )
79+ HStack ( alignment: . firstTextBaseline, spacing: 8 ) {
80+ Text ( " Line one \n Line two \n Line three " )
81+ . font ( . body)
82+ . multilineTextAlignment ( . leading)
83+ Text ( " Note " )
84+ . font ( . caption)
85+ . foregroundStyle ( . secondary)
86+ }
87+ . padding ( 8 )
88+ . border ( Color . blue)
89+ Text ( " HStack lastTextBaseline (multi-line + single line): " ) . bold ( )
90+ HStack ( alignment: . lastTextBaseline, spacing: 8 ) {
91+ Text ( " Line one \n Line two \n Line three " )
92+ . font ( . body)
93+ . multilineTextAlignment ( . leading)
94+ Text ( " Note " )
95+ . font ( . caption)
96+ . foregroundStyle ( . secondary)
97+ }
98+ . padding ( 8 )
99+ . border ( Color . blue)
68100 Text ( " Text: " ) . bold ( )
69101 HStack {
70102 Text ( " Long text that should receive the extra space from the short text when the width is divided " )
You can’t perform that action at this time.
0 commit comments