Skip to content

Commit

Permalink
Moving global listStyleType style to TabbedNav
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Apr 10, 2024
1 parent 37ce528 commit 1195106
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/TabbedNav/TabbedNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Box, PolymorphicProps } from '~/components/Box'
import { Button } from '~/components/Button'
import { IconProps } from '~/icons/types'

import { tabVariants, TabVariants } from './styles.css'
import { tabList, tabVariants, TabVariants } from './styles.css'

export type TabOption = {
label: ReactNode
Expand Down Expand Up @@ -66,7 +66,7 @@ export const TabbedNav = (props: PolymorphicProps<TabbedNavProps, 'div'>) => {

return (
<Box as="nav" {...rest}>
<Box as="ul" gap="2">
<Box as="ul" gap="2" className={clsx(tabList)}>
{tabs.map((option, tabIndex) => {
const isActive = option.value === value

Expand Down
5 changes: 5 additions & 0 deletions src/components/TabbedNav/styles.css.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { style } from '@vanilla-extract/css'
import { RecipeVariants, recipe } from '@vanilla-extract/recipes'

import { atoms } from '~/css'

export const tabList = style({
listStyleType: 'none',
})

export const tabVariants = recipe({
variants: {
variant: {
Expand Down
1 change: 0 additions & 1 deletion src/css/global.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ globalStyle('*', {
fontStyle: 'unset',
fontVariant: 'unset',
fontWeight: 'unset',
listStyleType: 'none',
margin: 0,
outline: 'unset',
padding: 0,
Expand Down

0 comments on commit 1195106

Please sign in to comment.