Skip to content

Commit 3052001

Browse files
committed
fix line height in header
1 parent 4523888 commit 3052001

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

packages/@react-spectrum/s2/src/ComboBox.tsx

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -221,30 +221,21 @@ export let listboxHeader = style<{size?: 'S' | 'M' | 'L' | 'XL'}>({
221221
boxSizing: 'border-box',
222222
minHeight: 'control',
223223
paddingY: centerPadding(),
224-
display: 'grid',
225-
gridTemplateAreas: [
226-
'. checkmark icon label value keyboard descriptor .',
227-
'. . . description . . . .'
228-
],
229-
gridTemplateColumns: {
224+
marginX: {
230225
size: {
231-
S: [edgeToText(24), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(24)],
232-
M: [edgeToText(32), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(32)],
233-
L: [edgeToText(40), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(40)],
234-
XL: [edgeToText(48), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(48)]
226+
S: '[calc(24 * 3 / 8)]',
227+
M: '[calc(32 * 3 / 8)]',
228+
L: '[calc(40 * 3 / 8)]',
229+
XL: '[calc(48 * 3 / 8)]'
235230
}
236-
},
237-
rowGap: {
238-
':has([slot=description])': space(1)
239231
}
240232
});
241233

242234
export let listboxHeading = style({
243-
font: 'ui',
235+
fontSize: 'ui',
244236
fontWeight: 'bold',
245-
margin: 0,
246-
gridColumnStart: 2,
247-
gridColumnEnd: -2
237+
lineHeight: 'ui',
238+
margin: 0
248239
});
249240

250241
// not sure why edgeToText won't work...
@@ -446,7 +437,7 @@ export const ComboBox = /*#__PURE__*/ (forwardRef as forwardRefType)(function Co
446437
}}>
447438
<ListBox
448439
items={items}
449-
className={listbox}>
440+
className={listbox({size})}>
450441
{children}
451442
</ListBox>
452443
</Virtualizer>

0 commit comments

Comments
 (0)