-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π :: [#74] SceneApplicationInfoListDetail Component μΆκ°
- Loading branch information
Showing
5 changed files
with
126 additions
and
11 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
Projects/App/Resources/Assets.xcassets/okIcon.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "okIcon.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Projects/App/Resources/Assets.xcassets/okIcon.imageset/okIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions
82
Projects/App/Sources/DesignSystem/Program/SceneApplicationInfoListDetail.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// | ||
// SceneApplicationInfoListDetail.swift | ||
// Expo-iOS | ||
// | ||
// Created by μμ§μ on 1/12/25. | ||
// Copyright Β© 2025 SchoolofCompany. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
public struct SceneApplicationInfoListDetail: View { | ||
var programNum: Int | ||
var userName: String | ||
var affiliation: String | ||
var position: String | ||
var phoneNumber: String | ||
var consentStatus: Bool | ||
var action: () -> Void | ||
|
||
@State private var isPressed = false | ||
|
||
public init( | ||
programNum: Int, | ||
userName: String, | ||
affiliation: String, | ||
position: String, | ||
phoneNumber: String, | ||
consentStatus: Bool, | ||
action: @escaping () -> Void = {} | ||
) { | ||
self.programNum = programNum | ||
self.userName = userName | ||
self.affiliation = affiliation | ||
self.position = position | ||
self.phoneNumber = phoneNumber | ||
self.consentStatus = consentStatus | ||
self.action = action | ||
} | ||
|
||
public var body: some View { | ||
Button(action: { | ||
self.action() | ||
}) { | ||
HStack(spacing: 0) { | ||
Text("\(programNum)") | ||
.expoFont(.caption1B) | ||
.padding(.leading, 8) | ||
.frame(width: 50, alignment: .leading) | ||
|
||
Text(userName) | ||
.frame(width: 70, alignment: .leading) | ||
|
||
Text(affiliation) | ||
.frame(width: 70, alignment: .leading) | ||
|
||
Text(position) | ||
.frame(width: 70, alignment: .leading) | ||
|
||
Text(phoneNumber) | ||
.frame(width: 170, alignment: .leading) | ||
|
||
Image(consentStatus ? "okIcon" : "ButtonX") | ||
.frame(width: 130, alignment: .center) | ||
} | ||
.padding(.bottom, 36) | ||
.expoFont(.caption2R) | ||
} | ||
.buttonStyle(PlainButtonStyle()) | ||
.gesture( | ||
DragGesture(minimumDistance: 0) | ||
.onChanged { _ in self.isPressed = true } | ||
.onEnded { _ in | ||
self.isPressed = false | ||
self.action() | ||
} | ||
) | ||
} | ||
} | ||
|
||
#Preview { | ||
UserManagementView() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,8 +144,6 @@ struct ProgramView: View { | |
|
||
Spacer() | ||
} | ||
|
||
|
||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters