aiOS · Founder
Every surface, designed and coded.
An AI employee for small businesses. These are its real screens.
Case study→1struct Bubble: View { 2 let text: String 3 let isIncoming: Bool 4 let hasTail: Bool 5 6 var body: some View { 7 Text(text).font(Tokens.bubbleFont) 8 .foregroundColor(fg) 9 .padding(.horizontal, Tokens.bubbleHPadding) 10 .padding(.vertical, Tokens.bubbleVPadding) 11 .background(bubbleBackground) 12 } 13 14 // the tail sits on the outer corner 15 var bubbleBackground: some View { 16 BubbleShape(isIncoming: isIncoming, 17 cornerRadius: Tokens.bubbleCornerRadius) 18 .fill(bubbleFill) 19 } 20} 21 22struct Bubble: View { 23 let text: String 24 let isIncoming: Bool 25 let hasTail: Bool 26 27 var body: some View { 28 Text(text).font(Tokens.bubbleFont) 29 .foregroundColor(fg) 30 .padding(.horizontal, Tokens.bubbleHPadding) 31 .padding(.vertical, Tokens.bubbleVPadding) 32 .background(bubbleBackground) 33 } 34 35 // the tail sits on the outer corner 36 var bubbleBackground: some View { 37 BubbleShape(isIncoming: isIncoming, 38 cornerRadius: Tokens.bubbleCornerRadius) 39 .fill(bubbleFill) 40 } 41}Bubble.swift
