Skip to content

Commit

Permalink
Fix Previewable (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinneko authored Oct 31, 2024
1 parent 1cb5344 commit 4c0d456
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/CharcoalSwiftUI/Components/CharcoalSpinner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public extension View {
}
}

#if compiler(>=6.0)
@available(iOS 17, *)
#Preview {
@Previewable @State var isPresenting = true
Expand Down Expand Up @@ -143,3 +144,4 @@ public extension View {
}
.ignoresSafeArea()
}
#endif
2 changes: 2 additions & 0 deletions Sources/CharcoalSwiftUI/Components/CharcoalTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public extension View {
}
}

#if compiler(>=6.0)
@available(iOS 17, *)
#Preview {
@Previewable @State var text1 = ""
Expand Down Expand Up @@ -121,3 +122,4 @@ public extension View {
)
}.padding()
}
#endif
2 changes: 2 additions & 0 deletions Sources/CharcoalSwiftUI/Components/Hint/CharcoalHint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public struct CharcoalHint: View {
}
}

#if compiler(>=6.0)
@available(iOS 17, *)
#Preview {
@Previewable @State var isPresenting = true
Expand All @@ -84,3 +85,4 @@ public struct CharcoalHint: View {

}.padding()
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public extension View {
}
}

#if compiler(>=6.0)
@available(iOS 17, *)
#Preview {
@Previewable @State var isPresenting = true
Expand Down Expand Up @@ -278,3 +279,4 @@ public extension View {
})
.charcoalOverlayContainer()
}
#endif
2 changes: 2 additions & 0 deletions Sources/CharcoalSwiftUI/Components/Toast/CharcoalToast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ public extension View {
}
}

#if compiler(>=6.0)
@available(iOS 17, *)
#Preview {
@Previewable @State var isPresenting = true
Expand Down Expand Up @@ -269,3 +270,4 @@ public extension View {
}
.charcoalOverlayContainer()
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public extension View {
}
}

#if compiler(>=6.0)
@available(iOS 17, *)
#Preview {
@Previewable @State var isPresenting = true
Expand Down Expand Up @@ -299,3 +300,4 @@ public extension View {
}
.charcoalOverlayContainer()
}
#endif
2 changes: 2 additions & 0 deletions Sources/CharcoalSwiftUI/Modal/CharcoalModalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public extension View {
}
}

#if compiler(>=6.0)
@available(iOS 17, *)
#Preview {
@Previewable @State var isPresented = false
Expand Down Expand Up @@ -258,3 +259,4 @@ public extension View {
}
}
}
#endif

0 comments on commit 4c0d456

Please sign in to comment.