//
//  HStack.swift
//  
//
//  Created by Oscar Byström Ericsson on 2021-04-14.
//

struct HStack: Text {
    var spacing: Int = 1
    let content: [Text]

    var separator: String {
        String(repeating: " ", count: spacing)
    }
    
    var body: Text {
        content.map(\.description).joined(separator: separator)
    }
}
