You can use this simple view to preview your SwiftUI views in different appearances:
import DarkLightModePreview
struct Checkbox_Previews: PreviewProvider {
static var previews: some View {
DarkLightModePreview {
HStack {
CustomCheckbox(checked: false, hover: false) {}
CustomCheckbox(checked: false, hover: true) {}
CustomCheckbox(checked: true, hover: false) {}
CustomCheckbox(checked: true, hover: true) {}
}
}
}
}
- Add this repository to Swift Package Manager