Fixed a mistake in README.md (#2)
This package allows for custom alert presentation with The Composable Architecture from Point-Free.
Install in Xcode as a package dependency.
To create an alert, you need to have a store which can scope the changes of CustomTcaAlert.State and CustomTcaAlert.Action. Then pass in a view as the alert content.
CustomTcaAlert.State
CustomTcaAlert.Action
import TCACustomAlert WithViewStore(store) { viewStore in VStack { ContentView() } .customTcaAlert( store.scope( state: \.alertState, action: AlertDemoReducer.Action.alert ), content: { VStack(spacing: 16) { Text("Hello") .font(.headline) Button("Dismiss", action: { viewStore.send(.alert(.dismiss)) }) .padding(.top) } .padding() .background() .cornerRadius(8) .padding(.horizontal) } ) }
This demo application can be accessed via TCACustomAlert.xcworkspace.
TCACustomAlert.xcworkspace
TCACustomAlert
📝 Description
This package allows for custom alert presentation with The Composable Architecture from Point-Free.
Installation
Install in Xcode as a package dependency.
Basics
To create an alert, you need to have a store which can scope the changes of
CustomTcaAlert.State
andCustomTcaAlert.Action
. Then pass in a view as the alert content.Demo
This demo application can be accessed via
TCACustomAlert.xcworkspace
.🏎️ Road Map