view GeoQuiz/Helpers/SettingsRow.swift @ 30:eb23effeede7

add DatasetView
author Dennis C. M. <dennis@denniscm.com>
date Thu, 10 Nov 2022 11:51:52 +0100
parents 3f4b366d476d
children
line wrap: on
line source

//
//  SettingsRow.swift
//  GeoQuiz
//
//  Created by Dennis Concepción Martín on 7/10/22.
//

import SwiftUI

struct SettingsRow: View {
    var color: Color
    var symbol: String
    var text: String
    
    
    var body: some View {
        HStack(alignment: .center, spacing: 20) {
            RoundedRectangle(cornerRadius: 5)
                .frame(width: 30, height: 30)
                .foregroundColor(color)
                .overlay(
                    Image(systemName: symbol)
                        .foregroundColor(.white)
                )
            
            Text(text)
                .foregroundColor(.primary)
        }
        
    }
}

struct SettingsRow_Previews: PreviewProvider {
    static var previews: some View {
        SettingsRow(
            color: .mayaBlue,
            symbol: "info",
            text: "About"
        )
    }
}