1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | import SwiftUI struct SectionListRowView : View { static let screenWidth = UIScreen . main . bounds . size . width static let screenHeight = UIScreen . main . bounds . size . height static let screenSize = UIScreen . main . bounds . size var abbreviate : String var name : String var comment : String = "AI" var body : some View { ZStack { Color . white . edgesIgnoringSafeArea (. all ) HStack () { Text ( abbreviate ) . foregroundColor (. blue ) . font (. system ( size : 13 )) . frame ( width : SectionListRowView . screenWidth * 0.9 * 0.1 , height : 20 , alignment : . center ) . overlay ( RoundedRectangle ( cornerRadius : 5 ) . stroke ( Color . blue , lineWidth : 1 ) ) Text ( name ) . font (. system ( size : 13 )) . frame ( width : SectionListRowView . screenWidth * 0.9 * 0.5 , height : 20 , alignment : . leading ) Text ( comment ) . font (. system ( size : 13 )) . foregroundColor (. blue ) . frame ( width : SectionListRowView . screenWidth * 0.9 * 0.3 , height : 20 , alignment : . trailing ) }. padding () } . padding () . cornerRadius ( 5 ) . frame ( width : SectionListRowView . screenWidth * 0.9 , height : 60 , alignment : . center ) . shadow ( radius : 5 ) } } |