add Button component; pager updated

This commit is contained in:
tmshv committed 2020-02-18 17:43:37 +03:00
1 parent 843ade58ad
commit 41467aa447
6 files changed
+73 -39

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import './styles.css'
import Link from 'next/link'
export type ButtonProps = {
style?: React.CSSProperties
href?: string
}
export const Button: React.FC<ButtonProps> = props => {
if (props.href) {
return (
<Link href={props.href}>
<a className={'button invisible'} style={props.style}>
{props.children}
</a>
</Link>
)
}
return (
<button className={'button'} style={props.style}>
{props.children}
</button>
)
}