//
//  Text+Ex.swift
//  Pods
//
//  Created by 100Years on 2025/3/13.
//

import SwiftUI
public extension Text {
    func gradientForeground(colors: [Color], startPoint: UnitPoint, endPoint: UnitPoint) -> some View {
        self
            .overlay(
                LinearGradient(
                    gradient: Gradient(colors: colors),
                    startPoint: startPoint,
                    endPoint: endPoint
                )
                .mask(self)
            )
    }
}
public extension View {
    func gradientForeground(colors: [Color], startPoint: UnitPoint, endPoint: UnitPoint) -> some View {
        self
            .overlay(
                LinearGradient(
                    gradient: Gradient(colors: colors),
                    startPoint: startPoint,
                    endPoint: endPoint
                )
                .mask(self)
            )
    }
}
