refactor: replace custom UI toggle with shadcn Switch component (#7308)

* refactor(webview-ui): replace custom UI toggle with shadcn Switch component

- Add @radix-ui/react-switch dependency (v1.2.6) https://ui.shadcn.com/docs/components/switch
- Refactor ClineRulesToggleModal to use Radix Switch instead of VSCode buttons
- Improve button styling with reduced padding and adjusted icon sizes
- Enhance form layout with conditional rendering based on expansion state
- Update input field styling with better focus states and border handling

This change provides a more consistent UI experience by leveraging Radix UI's
accessible Switch component while maintaining the same functionality.

* clean up

* clean up

* update switch color

* adjust

* revert unrelated changes

* size

* toggle

* Update webview-ui/src/components/cline-rules/RuleRow.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Beeandellipsis-dev[bot] authored and GitHub committed 2025-11-18 12:39:50 -08:00
1 parent abafcc7290
commit 3baaa5c8b4
9 files changed
+231 -236

No files matched your search

+2
View File
@@ -9,6 +9,8 @@
--color-code-foreground: var(--vscode-editor-foreground);
--color-code-border: var(--vscode-editor-border);
--color-code-block-background: var(--vscode-editor-background, --vscode-sideBar-background, rgb(30 30 30));
--color-text-block-background: var(--vscode-textCodeBlock-background);
--color-editor-group-border: var(--vscode-editorGroup-border);
--color-sidebar-background: var(--vscode-sideBar-background);
--color-sidebar-foreground: var(--vscode-sideBar-foreground);
--color-input-foreground: var(--vscode-input-foreground);