-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* revert deprecated * pbselect * gitignore * xcode file
- Loading branch information
1 parent
0f68c8b
commit c4aca8a
Showing
5 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
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,3 @@ | ||
.swiftpm/xcode/package.xcworkspace/xcuserdata | ||
.swiftpm/xcode/xcuserdata | ||
Package.resolved |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,52 @@ | ||
// | ||
// PBSelect.swift | ||
// | ||
// | ||
// Created by Everton Cunha on 14/06/22. | ||
// | ||
|
||
import SwiftUI | ||
|
||
public struct PBSelect: ButtonStyle { | ||
|
||
let title: String | ||
|
||
let style: PBCardStyle | ||
|
||
public init(_ title: String, style: PBCardStyle) { | ||
self.title = title | ||
self.style = style | ||
} | ||
|
||
public func makeBody(configuration: Configuration) -> some View { | ||
VStack(alignment: .leading, spacing: 4) { | ||
if let title = title { | ||
Text(title) | ||
.pbFont(.caption, color: .pbTextLight) | ||
} | ||
PBCard(padding: 0, style: style) { | ||
HStack { | ||
configuration.label | ||
.frame(height: 44) | ||
.pbFont(.body) | ||
Spacer() | ||
PBIcon.fontAwesome(.chevronDown) | ||
} | ||
.padding(.horizontal, .pbSmall) | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct PBSelect_Previews: PreviewProvider { | ||
static var previews: some View { | ||
registerFonts() | ||
return Group { | ||
Button("Burguers") { | ||
|
||
} | ||
.buttonStyle(PBSelect("FAVORITE FOOD", style: .default)) | ||
.preferredColorScheme(.light) | ||
} | ||
} | ||
} |
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
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