Skip to content

Commit a5f4f4b

Browse files
authored
fix: Mobile TagGroup and TreeView example (#9100)
* fix: Mobile TagGroup example * fix a similar issue with treeview
1 parent 7ff6696 commit a5f4f4b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function PhotoCategories() {
6060
return (
6161
<TagGroup
6262
label="Photo categories"
63-
styles={style({width: 320})}
63+
styles={style({maxWidth: 320})}
6464
/*- begin highlight -*/
6565
items={list.items}
6666
onRemove={(keys) => list.remove(...keys)}>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ function Example(props) {
299299
let [selected, setSelected] = useState<Selection>(new Set());
300300

301301
return (
302-
<div>
302+
<div className={style({width: 'full'})}>
303303
<TreeView
304304
{...props}
305305
aria-label="Pokemon evolution"
306-
styles={style({height: 250, width: 300})}
306+
styles={style({height: 250, width: 'full', maxWidth: 300})}
307307
///- begin highlight -///
308308
/* PROPS */
309309
selectedKeys={selected}

0 commit comments

Comments
 (0)