Menu component layout updated
This commit is contained in:
1 parent
9ca50e87c2
commit
792be94a79
2 files changed
+65
-35
No files matched your search
@@ -0,0 +1,33 @@
|
||||
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