add Button component; pager updated
This commit is contained in:
1 parent
843ade58ad
commit
41467aa447
6 files changed
+73
-39
No files matched your search
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user