//
//  View+Label.swift
//  IOS_study
//
//  Created by CC-star on 2025/6/12.
//

import SwiftUI

extension View {
   func padding1() -> some View{
      padding(.vertical,2)
         .padding(.horizontal,3)
   }
   func padding3() -> some View{
      padding(.vertical,4)
         .padding(.horizontal,7)
   }
   func redBorder() -> some View{
      size12()
      .red()
      .semib()
      .padding1()
      .border(borderColor: Color.red)
   }
   func accentBorder() -> some View{
      size12()
      .accent()
      .semib()
      .padding1()
      .border(borderColor: Color.accent)
   }
   
   
   func labelBG() -> some View{
      size13()
         .tc()
         .semib()
         .padding3()
         .background(Color.labeBG)//背景一般先padding，再background
         .radius()
   }
   
   func labelBG2() -> some View{
      size13()
         .tc()
         .med()
         .padding3()
         .background(Color.labelBG2)//背景一般先padding，再background
         .radius()
   }
   func labelPP() -> some View{
      size13()
         .purple()
         .med()
         .padding3()
         .background(Color.purple.opacity(0.18))//背景一般先padding，再background
         .radius()
   }
   
   func labelWA() -> some View{
      size11()
         .white()
         .padding1()
         .background(Color.accent)
         .radius()
   }
   
   func labelWAL() -> some View{
      size14()
         .white()
         .med()
         .padding3()
         .background(Color.accent)
         .radius()
   }
}
