Skip to content

Commit a0e3788

Browse files
OpenStaxClaudeRoyEJohnson
authored andcommitted
Remove redundant checkbox-input class from TreeCheckbox
The selection slot div in TreeCheckbox was using both className="checkbox-input" and data-slot="selection", causing duplicate styling. The CSS already has comprehensive [data-slot="selection"] rules that cover all the necessary styling, making the checkbox-input class redundant and confusing. Changes: - Removed className="checkbox-input" from TreeCheckbox selection slot - CSS [data-slot="selection"] rules already include all necessary styling - Updated 5 test snapshots to reflect the cleaner markup This addresses the Copilot review comment about duplicate/conflicting styling between .checkbox-input class and [data-slot="selection"] attribute. revert lock files
1 parent ac084ab commit a0e3788

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

src/components/Tree/TreeCheckbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const TreeCheckbox = ({
6666
style={checkboxStyle}
6767
isDisabled={isDisabled}
6868
>
69-
<div className="checkbox-input" data-slot="selection" />
69+
<div data-slot="selection" />
7070
{children}
7171
</RACCheckbox>
7272
);

src/components/Tree/__snapshots__/TreeCheckbox.spec.tsx.snap

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ exports[`TreeCheckbox handles disabled state 1`] = `
7474
/>
7575
</span>
7676
<div
77-
className="checkbox-input"
7877
data-slot="selection"
7978
/>
8079
Click Me
@@ -156,7 +155,6 @@ exports[`TreeCheckbox handles indeterminate state 1`] = `
156155
/>
157156
</span>
158157
<div
159-
className="checkbox-input"
160158
data-slot="selection"
161159
/>
162160
Click Me
@@ -237,7 +235,6 @@ exports[`TreeCheckbox handles options 1`] = `
237235
/>
238236
</span>
239237
<div
240-
className="checkbox-input"
241238
data-slot="selection"
242239
/>
243240
Click Me
@@ -318,7 +315,6 @@ exports[`TreeCheckbox matches snapshot 1`] = `
318315
/>
319316
</span>
320317
<div
321-
className="checkbox-input"
322318
data-slot="selection"
323319
/>
324320
Click Me
@@ -400,7 +396,6 @@ exports[`TreeCheckbox supports slot="selection" 1`] = `
400396
/>
401397
</span>
402398
<div
403-
className="checkbox-input"
404399
data-slot="selection"
405400
/>
406401
Click Me

0 commit comments

Comments
 (0)