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>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
.button {
|
||||
border: none;
|
||||
font-size: var(--font-size-default);
|
||||
|
||||
text-align: center;
|
||||
margin-top: var(--size-m);
|
||||
margin-bottom: var(--size-m);
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
|
||||
padding: var(--size-s) var(--size-m);
|
||||
border-radius: 100px;
|
||||
|
||||
background-color: var(--color-back);
|
||||
box-shadow: 0 0 0 1px rgba(27, 51, 88, 0.15);
|
||||
|
||||
transition: box-shadow 150ms;
|
||||
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
box-shadow: 0 4px 20px rgba(27, 51, 88, 0.15)
|
||||
}
|
||||
Reference in new issue
Block a user