2020-07-07 19:15:12 +02:00
|
|
|
//
|
|
|
|
// SettingsAccountLabelView.swift
|
|
|
|
// Multiplatform iOS
|
|
|
|
//
|
|
|
|
// Created by Rizwan on 07/07/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import RSCore
|
|
|
|
|
|
|
|
struct SettingsAccountLabelView: View {
|
|
|
|
let accountImage: RSImage?
|
|
|
|
let accountLabel: String
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
HStack {
|
|
|
|
Image(rsImage: accountImage!)
|
|
|
|
.resizable()
|
2020-07-08 11:43:10 +02:00
|
|
|
.scaledToFit()
|
|
|
|
.frame(width: 32, height: 32)
|
2020-07-07 19:15:12 +02:00
|
|
|
Text(verbatim: accountLabel).font(.title)
|
|
|
|
}
|
|
|
|
.foregroundColor(.primary).padding(4.0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct SettingsAccountLabelView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
2020-07-08 11:43:10 +02:00
|
|
|
List {
|
|
|
|
SettingsAccountLabelView(
|
|
|
|
accountImage: AppAssets.image(for: .onMyMac),
|
|
|
|
accountLabel: "On My Device"
|
|
|
|
)
|
|
|
|
SettingsAccountLabelView(
|
|
|
|
accountImage: AppAssets.image(for: .feedbin),
|
|
|
|
accountLabel: "Feedbin"
|
|
|
|
)
|
|
|
|
SettingsAccountLabelView(
|
|
|
|
accountImage: AppAssets.accountLocalPadImage,
|
|
|
|
accountLabel: "On My iPad"
|
|
|
|
)
|
|
|
|
SettingsAccountLabelView(
|
|
|
|
accountImage: AppAssets.accountLocalPhoneImage,
|
|
|
|
accountLabel: "On My iPhone"
|
|
|
|
)
|
|
|
|
}
|
2020-07-07 19:15:12 +02:00
|
|
|
}
|
|
|
|
}
|