Skip to content

FluidGroup/CompositionKit

Repository files navigation

CompositionKit

A collection of components to build composed component

Requirements

Components (building blocks)

AnyView

To create an anonymous view with making content

func makeSomethingView(onTap: @escaping () -> Void) -> UIView {

  let button = UIButton(..., primaryAction: .init { _ in 
    onTap()
  })
  
  return AnyView { view in 
    VStackBlock {
      button
    }
  }
}

License

MIT