Skip to content

Commit 39e6ade

Browse files
authored
docs: s2 docs quick fixes (#8967)
* docs: update the expanded key in s2 accordion docs * increase gap between icons in available icons * fix focus ring on search menu tabs
1 parent 76e8dd1 commit 39e6ade

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

packages/dev/s2-docs/pages/s2/Accordion.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {Accordion, Disclosure, DisclosureTitle, DisclosurePanel, type Key} from
3636
import {useState} from 'react';
3737

3838
function Example() {
39-
let [expandedKeys, setExpandedKeys] = useState(new Set<Key>(['system']));
39+
let [expandedKeys, setExpandedKeys] = useState(new Set<Key>(['settings']));
4040

4141
return (
4242
<Accordion

packages/dev/s2-docs/src/IconCards.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function IconCards() {
6464
<Autocomplete filter={filter}>
6565
<div className={style({display: 'flex', flexDirection: 'column', gap: 8})}>
6666
<SearchField size="L" aria-label="Search icons" placeholder="Search icons" />
67-
<Virtualizer layout={GridLayout} layoutOptions={{minItemSize: new Size(64, 64), maxItemSize: new Size(64, 64), minSpace: new Size(8, 8), preserveAspectRatio: true}}>
67+
<Virtualizer layout={GridLayout} layoutOptions={{minItemSize: new Size(64, 64), maxItemSize: new Size(64, 64), minSpace: new Size(12, 12), preserveAspectRatio: true}}>
6868
<ListBox
6969
onAction={(item) => handleCopyImport(item.toString())}
7070
items={iconList}

packages/dev/s2-docs/src/Tabs.tsx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const tablist = style({
7474
paddingStart: 12,
7575
flexShrink: 0,
7676
flexBasis: '[0%]',
77-
gap: 32,
77+
gap: 24,
7878
maxWidth: 240,
7979
height: 'full',
8080
paddingY: 4
@@ -161,7 +161,7 @@ function TabLine(props: TabLineProps) {
161161
);
162162
}
163163

164-
const tab = style<TabRenderProps & {density?: 'compact' | 'regular', labelBehavior?: 'show' | 'hide'}>({
164+
const tab = style<TabRenderProps & {density?: 'compact' | 'regular', orientation?: 'vertical' | 'horizontal', labelBehavior?: 'show' | 'hide'}>({
165165
...focusRing(),
166166
display: 'flex',
167167
color: {
@@ -173,7 +173,26 @@ const tab = style<TabRenderProps & {density?: 'compact' | 'regular', labelBehavi
173173
},
174174
borderRadius: 'sm',
175175
gap: 'text-to-visual',
176-
height: 48,
176+
height: {
177+
orientation: {
178+
horizontal: {
179+
density: {
180+
compact: 32,
181+
regular: 48
182+
}
183+
}
184+
}
185+
},
186+
minHeight: {
187+
orientation: {
188+
vertical: {
189+
density: {
190+
compact: 32,
191+
regular: 48
192+
}
193+
}
194+
}
195+
},
177196
alignItems: 'center',
178197
position: 'relative',
179198
cursor: 'default',

0 commit comments

Comments
 (0)