-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd02de4
commit 6d271b1
Showing
5 changed files
with
46 additions
and
6 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
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
29 changes: 29 additions & 0 deletions
29
Demo/Storybook/Storybook/Components/PhotoPreviewComponentView.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,29 @@ | ||
// | ||
// PhotoPreviewComponentView.swift | ||
// Storybook | ||
// | ||
// Created by Ndriqim Nagavci on 19/09/2024. | ||
// | ||
|
||
import PovioKitSwiftUI | ||
import SwiftUI | ||
|
||
struct PhotoPreviewComponentView: View { | ||
@State private var showPhotoPreview = false | ||
private var items: [PhotoPreviewItem] = [ | ||
.init(image: Image("PovioKit")), | ||
.init(url: .init(string: "https://raw.githubusercontent.com/poviolabs/PovioKit/develop/Resources/PovioKit.png")) | ||
] | ||
|
||
var body: some View { | ||
Button { | ||
showPhotoPreview.toggle() | ||
} label: { | ||
Text("Show Photo Preview") | ||
} | ||
.photoPreview( | ||
present: $showPhotoPreview, | ||
items: items | ||
) | ||
} | ||
} |
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