SwiftGlass
SwiftGlass copied to clipboard
2.0 SwiftGlassUI Library
This pull request introduces a new custom Switch component and a Toggle view in the Demo project, providing a visually rich and interactive toggle switch with drag gestures and accent color customization. The changes also include a gradient background for the Toggle view and a preview in dark mode.
New Components and Views:
- Custom
SwitchComponent: Added a reusableSwitchview with drag gesture support, dynamic fill progress, and customizable accent colors. It includes animation for smooth state transitions and gesture handling for toggling between on/off states. ([Demo/Demo/Samples/Essential/Switch.swiftR1-R237](diffhunk://#diff-c6d00cd1533ee11104107fa46a998674756703c939bce9c44f63f5910fca5e84R1-R237)) ToggleView: Created aToggleview showcasing multipleSwitchcomponents with various accent colors arranged in a grid layout. Includes a gradient background for visual enhancement. ([Demo/Demo/Samples/Essential/Switch.swiftR1-R237](diffhunk://#diff-c6d00cd1533ee11104107fa46a998674756703c939bce9c44f63f5910fca5e84R1-R237))
Enhancements:
- Dark Mode Preview: Added a preview for the
Toggleview in dark mode using thepreferredColorScheme(.dark)modifier. ([Demo/Demo/Samples/Essential/Switch.swiftR1-R237](diffhunk://#diff-c6d00cd1533ee11104107fa46a998674756703c939bce9c44f63f5910fca5e84R1-R237))