 @available (iOS 13.0, *)
 fileprivate struct PopupView<ContentView>: UIViewControllerRepresentable where ContentView: View {
   let isPresented: Bool
+  let style: PopupStyle
   let onDismiss: (() -> Void)?
   let contentView: ContentView
   

        return
      }
      if let hostingController = hostingController {
        hostingController.rootView = contentView
        hostingController.contentSizeInPopup = hostingController.sizeThatFits(in: view.bounds.size)
      } else {


import SwiftUI

public typealias PopupStyle = STPopupStyle

@available (iOS 13.0, *)
public extension View {
  func popup<ContentView>(
    isPresented: Binding<Bool>,
    style: PopupStyle = .formSheet,
    onDismiss: (() -> Void)? = nil,
    @ViewBuilder contentView: @escaping () -> ContentView
  ) -> some View where ContentView: View {
    overlay(
      // We don't need a binding for now. It's exposed as `Binding` so that we can change internal implementation
      // without affecting public API.
      PopupView(isPresented: isPresented.wrappedValue, style: style, onDismiss: onDismiss, contentView: contentView())
        .frame(
          width: isPresented.wrappedValue ? Self.windowSize.width : 0,
          height: isPresented.wrappedValue ? Self.windowSize.height : 0
