I couldn't find the answer I was looking for so I thought I would make my own post so people could find it.
For those who couldn't work out the type for the NavLink v5 wrapper for react-router v6 but needed to use it so styled-components could read the activeClassName.
As far as I could tell you cannot use NavLink (v6) without this wrapper when styling it through styled-components
import React, { CSSProperties } from 'react'
import { NavLink as BaseNavLink, NavLinkProps } from 'react-router-dom'
/**
* This is a wrapper for the v6 version of NavLink to keep the v5 functionality
* See here for base - https://reactrouter.com/docs/en/v6/components/nav-link#navlink
*
* This is needed so styled components can use active className as it doesn't port the ({ isActive })
*/
type NavLinkWrapperProps = NavLinkProps & {
activeClassName?: string
activeStyle?: CSSProperties
}
export const NavLink = ({ activeClassName, activeStyle, ...props }: NavLinkWrapperProps) => {
return (
<BaseNavLink
{...props}
className={({ isActive }) => [props.className, isActive ? activeClassName : null].filter(Boolean).join(' ')}
style={({ isActive }) => ({
...props.style,
...(isActive ? activeStyle : null),
})}
/>
)
}

