diff --git a/core/docz/src/components/Link.tsx b/core/docz/src/components/Link.tsx index 7bddf0d68..955fef708 100644 --- a/core/docz/src/components/Link.tsx +++ b/core/docz/src/components/Link.tsx @@ -1,17 +1,21 @@ import * as React from 'react' import { useCallback } from 'react' import { Link as BaseLink, LinkProps, LinkGetProps } from '@reach/router' +import { omit } from 'lodash/fp' export { LinkProps } -export const Link = React.forwardRef>((props, ref) => { - const isActive = useCallback( - ({ isCurrent }: LinkGetProps) => { - return isCurrent ? { className: `${props.className} active` } : {} - }, - [props.className] - ) +export const Link = React.forwardRef>( + (defaultProps, ref) => { + const props = omit(['activeClassName', 'partiallyActive'], defaultProps) + const isActive = useCallback( + ({ isCurrent }: LinkGetProps) => { + return isCurrent ? { className: `${props.className} active` } : {} + }, + [props.className] + ) - return -}) + return + } +) Link.displayName = 'Link'