Menu component layout updated

This commit is contained in:
tmshv committed 2019-10-15 05:47:01 +03:00
1 parent 9ca50e87c2
commit 792be94a79
2 files changed
+65 -35

No files matched your search

+33
View File
@@ -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>
)
}
</>
)