Skip to content

Commit db51509

Browse files
authored
Fix Tree row padding when chevron isn't present (#6545)
* fix treeview stories controls * fix tree row padding if no checkbox and fix chromatic
1 parent 4980928 commit db51509

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

packages/@react-spectrum/tree/src/TreeView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const treeCellGrid = style({
140140
display: 'grid',
141141
width: 'full',
142142
alignItems: 'center',
143-
gridTemplateColumns: ['minmax(0, auto)', 'minmax(0, auto)', 'minmax(0, auto)', 'minmax(0, auto)', 'minmax(0, auto)', '1fr', 'minmax(0, auto)', 'auto'],
143+
gridTemplateColumns: ['minmax(0, auto)', 'minmax(0, auto)', 'minmax(0, auto)', 10, 'minmax(0, auto)', '1fr', 'minmax(0, auto)', 'auto'],
144144
gridTemplateRows: '1fr',
145145
gridTemplateAreas: [
146146
'drag-handle checkbox level-padding expand-button icon content actions actionmenu'

packages/@react-spectrum/tree/stories/TreeView.stories.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,16 @@ TreeExampleStatic.story = {
144144
},
145145
argTypes: {
146146
selectionMode: {
147-
control: {
148-
type: 'radio',
149-
options: ['none', 'single', 'multiple']
150-
}
147+
control: 'radio',
148+
options: ['none', 'single', 'multiple']
151149
},
152150
selectionStyle: {
153-
control: {
154-
type: 'radio',
155-
options: ['checkbox', 'highlight']
156-
}
151+
control: 'radio',
152+
options: ['checkbox', 'highlight']
157153
},
158154
disabledBehavior: {
159-
control: {
160-
type: 'radio',
161-
options: ['selection', 'all']
162-
}
155+
control: 'radio',
156+
options: ['selection', 'all']
163157
},
164158
disallowEmptySelection: {
165159
control: {

0 commit comments

Comments
 (0)