Menu component updated
This commit is contained in:
1 parent
11d628fd50
commit
be9f07bdb7
4 files changed
+80
-141
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import Link from 'next/link'
|
||||
|
||||
export interface ActiveLinkProps {
|
||||
href?: string
|
||||
activeStyle?: React.CSSProperties
|
||||
}
|
||||
|
||||
export const ActiveLink: React.FC<ActiveLinkProps> = props => props.href
|
||||
? (
|
||||
<Link href={props.href}>
|
||||
<a>{props.children}</a>
|
||||
</Link>
|
||||
) : (
|
||||
<span style={props.activeStyle}>{props.children}</span>
|
||||
)
|
||||
Reference in new issue
Block a user