Menu component updated
This commit is contained in:
1 parent
11d628fd50
commit
be9f07bdb7
4 files changed
+80
-141
No files matched your search
@@ -1,33 +0,0 @@
|
||||
import * as React from 'react'
|
||||
|
||||
export interface IMenuItemProps {
|
||||
active: boolean
|
||||
text: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export const MenuItem: React.FC<IMenuItemProps> = ({ active, text, url }) => (
|
||||
<>
|
||||
<style jsx>{`
|
||||
a {
|
||||
color: var(--dark-color);
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: var(--dark-color);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
border-color: var(--dark-color);
|
||||
}
|
||||
`}</style>
|
||||
|
||||
{active
|
||||
? (
|
||||
<span>{text}</span>
|
||||
) : (
|
||||
<a href={url}>{text}</a>
|
||||
)
|
||||
}
|
||||
</>
|
||||
)
|
||||
Reference in new issue
Block a user