Skip to content

Commit d310cb3

Browse files
authored
Merge pull request #67 from oasisprotocol/mz/mobileTabs
Enable horizontal scroll in TabList
2 parents 8562326 + ca94a06 commit d310cb3

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

src/components/tabs/index.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@ import {
88
import { cva, type VariantProps } from 'class-variance-authority'
99
import { cn } from '../../lib/utils'
1010

11-
const tabsListVariants = cva('p-1 radius-md', {
12-
variants: {
13-
variant: {
14-
default: 'h-10 bg-muted',
15-
layout: 'w-full h-12 rounded-b-none bg-border',
11+
const tabsListVariants = cva(
12+
'p-1 radius-md justify-start whitespace-nowrap overflow-x-auto overflow-y-hidden [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden',
13+
{
14+
variants: {
15+
variant: {
16+
default: 'h-10 bg-muted',
17+
layout: 'w-full h-12 rounded-b-none bg-border',
18+
},
1619
},
17-
},
18-
defaultVariants: {
19-
variant: 'default',
20-
},
21-
})
20+
defaultVariants: {
21+
variant: 'default',
22+
},
23+
}
24+
)
2225

2326
type TabsProps = React.ComponentProps<typeof BaseTabs>
2427

0 commit comments

Comments
 (0)