mirror of
https://github.com/easychen/pushdeer.git
synced 2024-09-08 02:08:11 +08:00
35 lines
707 B
Swift
35 lines
707 B
Swift
|
//
|
||
|
// DeviceItemView.swift
|
||
|
// PushDeer
|
||
|
//
|
||
|
// Created by HEXT on 2021/12/26.
|
||
|
//
|
||
|
|
||
|
import SwiftUI
|
||
|
|
||
|
/// 每个设备项的 View
|
||
|
struct DeviceItemView: View {
|
||
|
var name: String
|
||
|
var body: some View {
|
||
|
CardView {
|
||
|
HStack{
|
||
|
Image(systemName: "ipad.and.iphone")
|
||
|
.resizable()
|
||
|
.scaledToFit()
|
||
|
.frame(width: 40, height: 40, alignment: .center)
|
||
|
.padding(EdgeInsets(top: 0, leading: 18, bottom: 0, trailing: 8))
|
||
|
Text(name)
|
||
|
.font(.system(size: 20))
|
||
|
Spacer()
|
||
|
}
|
||
|
.frame(height: 80)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
struct DeviceItemView_Previews: PreviewProvider {
|
||
|
static var previews: some View {
|
||
|
DeviceItemView(name: "未知设备")
|
||
|
}
|
||
|
}
|