32 lines
		
	
	
		
			786 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			786 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
//
 | 
						|
//  ServiceCenterCategoryItemView.swift
 | 
						|
//  SodaLive
 | 
						|
//
 | 
						|
//  Created by klaus on 2023/08/11.
 | 
						|
//
 | 
						|
 | 
						|
import SwiftUI
 | 
						|
 | 
						|
struct ServiceCenterCategoryItemView: View {
 | 
						|
    
 | 
						|
    let category: String
 | 
						|
    let isSelected: Bool
 | 
						|
    
 | 
						|
    var body: some View {
 | 
						|
        GeometryReader { proxy in
 | 
						|
            Text(category)
 | 
						|
                .font(.custom(Font.medium.rawValue, size: 13.3))
 | 
						|
                .foregroundColor(.white)
 | 
						|
                .frame(width: proxy.size.width, height: 46.7)
 | 
						|
                .background(isSelected ? Color.button : Color.gray22)
 | 
						|
                .cornerRadius(4.7)
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
struct ServiceCenterCategoryItemView_Previews: PreviewProvider {
 | 
						|
    static var previews: some View {
 | 
						|
        ServiceCenterCategoryItemView(category: "전체", isSelected: false)
 | 
						|
    }
 | 
						|
}
 |