| 492 | // MARK: - Glass Toggle Style (now uses native switch for consistency) |
| 493 | |
| 494 | struct 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 | |