Repository navigation
0.0.4
What's New
@binding support
@Binding properties now generate the correct parameter type (Binding<T>) and assignment (self._isOn = isOn) in all generated inits.
@Slots struct Toggle<Label: View>: View {
@Binding var isOn: Bool
@Slot(.text) var label: Label
var body: some View { ... }
}
// Generated:
init(isOn: Binding<Bool>, @ViewBuilder label: () -> Label)
init(isOn: Binding<Bool>, label: LocalizedStringKey)Internal-state property wrappers are skipped
Properties annotated with @State, @StateObject, @Environment, @EnvironmentObject, @FocusState, @AppStorage, @SceneStorage, and other internal-state wrappers are automatically excluded from generated inits.
Internal
- Organized Slots source files into separate files