//
//  Text.swift
//  AcaMate
//
//  Created by Sean Kim on 12/1/24.
//

import SwiftUI

protocol MultilineStyle: View {
}

extension Text: MultilineStyle {
    
}

extension MultilineStyle {
    func multilineStyle(_ alignment: TextAlignment = .leading, limit: Int = 1, scale: CGFloat = 0.5) -> some View {
        return self
            .lineLimit(limit)
            .minimumScaleFactor(scale)
            .multilineTextAlignment(alignment)
            .truncationMode(.tail)
    }
}
