File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
Examples/DemosApp/DemosApp/ComponentsPreview/Helpers
Sources/ComponentsKit/Modal Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ struct ModalPreviewHelpers {
9090 Picker ( " Overlay Style " , selection: self . $model. overlayStyle) {
9191 Text ( " Blurred " ) . tag ( ModalOverlayStyle . blurred)
9292 Text ( " Dimmed " ) . tag ( ModalOverlayStyle . dimmed)
93- Text ( " Opaque " ) . tag ( ModalOverlayStyle . opaque )
93+ Text ( " Transparent " ) . tag ( ModalOverlayStyle . transparent )
9494 }
9595 Picker ( " Size " , selection: self . $model. size) {
9696 Text ( " Small " ) . tag ( ModalSize . small)
Original file line number Diff line number Diff line change 1+ /// Defines the style of the overlay displayed behind a modal.
12public enum ModalOverlayStyle {
3+ /// A dimmed overlay that darkens the background behind the modal.
24 case dimmed
5+ /// A blurred overlay that applies a blur effect to the background behind the modal.
36 case blurred
4- case opaque
7+ /// A transparent overlay that leaves the background fully visible behind the modal.
8+ case transparent
59}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ struct ModalOverlay<VM: ModalVM>: View {
2020 Color . black. opacity ( 0.7 )
2121 case . blurred:
2222 Color . clear. background ( . ultraThinMaterial)
23- case . opaque :
23+ case . transparent :
2424 // Note: It can't be completely transparent as it won't receive touch gestures.
2525 Color . black. opacity ( 0.0001 )
2626 }
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ open class UKModalController<VM: ModalVM>: UIViewController {
2323 self . model = model
2424
2525 switch model. overlayStyle {
26- case . dimmed, . opaque :
26+ case . dimmed, . transparent :
2727 self . overlay = UIView ( )
2828 case . blurred:
2929 self . overlay = UIVisualEffectView ( )
@@ -165,7 +165,7 @@ extension UKModalController {
165165 switch model. overlayStyle {
166166 case . dimmed:
167167 view. backgroundColor = . black. withAlphaComponent ( 0.7 )
168- case . opaque :
168+ case . transparent :
169169 view. backgroundColor = . clear
170170 case . blurred:
171171 ( view as? UIVisualEffectView ) ? . effect = UIBlurEffect ( style: . systemUltraThinMaterial)
You can’t perform that action at this time.
0 commit comments