Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
"name": "aria-label",
"type": "string",
"description": "Used to set the `aria-label` on the top level `<nav>` element."
},
{
"name": "sx",
"type": "SystemStyleObject",
"deprecated": true
}
],
"subcomponents": [
Expand Down Expand Up @@ -57,4 +52,4 @@
]
}
]
}
}
10 changes: 2 additions & 8 deletions packages/react/src/deprecated/UnderlineNav/UnderlineNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import type {To} from 'history'
import type React from 'react'
import styled from 'styled-components'
import {get} from '../../constants'
import type {SxProp} from '../../sx'
import sx from '../../sx'
import type {ComponentProps} from '../../utils/types'
import getGlobalFocusStyles from '../../internal/utils/getGlobalFocusStyles'

const ITEM_CLASS = 'PRC-UnderlineNav-item'
const SELECTED_CLASS = 'PRC-selected'

const UnderlineNavBase = styled.nav<SxProp>`
const UnderlineNavBase = styled.nav`
display: flex;
justify-content: space-between;
border-bottom: 1px solid ${get('colors.border.muted')};
Expand Down Expand Up @@ -39,8 +37,6 @@ const UnderlineNavBase = styled.nav<SxProp>`
.PRC-UnderlineNav-actions {
align-self: center;
}

${sx};
`

export type UnderlineNavProps = {
Expand Down Expand Up @@ -68,7 +64,7 @@ function UnderlineNav({actions, className, align, children, full, label, theme,
type StyledUnderlineNavLinkProps = {
to?: To
selected?: boolean
} & SxProp
}

const UnderlineNavLink = styled.a.attrs<StyledUnderlineNavLinkProps>(props => ({
className: clsx(ITEM_CLASS, props.selected && SELECTED_CLASS, props.className),
Expand Down Expand Up @@ -104,8 +100,6 @@ const UnderlineNavLink = styled.a.attrs<StyledUnderlineNavLinkProps>(props => ({
}

${getGlobalFocusStyles('-8px')};

${sx};
`

UnderlineNavLink.displayName = 'UnderlineNav.Link'
Expand Down
Loading