MCPcopy Create free account
hub / github.com/altic-dev/FluidVoice / GlassToggleStyle

Struct GlassToggleStyle

Sources/Fluid/Theme/NativeButtonStyles.swift:494–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492// MARK: - Glass Toggle Style (now uses native switch for consistency)
493
494struct GlassToggleStyle: ToggleStyle {
495 func makeBody(configuration: Configuration) -> some View {
496 ToggleBody(configuration: configuration)
497 }
498
499 private struct ToggleBody: View {
500 @Environment(\.theme) private var theme
501 let configuration: ToggleStyle.Configuration
502
503 var body: some View {
504 HStack {
505 self.configuration.label
506 .foregroundStyle(self.theme.palette.primaryText)
507
508 Spacer()
509
510 Toggle("", isOn: self.configuration.$isOn)
511 .toggleStyle(.switch)
512 .tint(self.theme.palette.accent)
513 .labelsHidden()
514 }
515 }
516 }
517}
518
519// MARK: - Native Form Row Style
520

Callers 1

FeedbackViewStruct · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected