added optional breadcrumbs; page layout refactoring; other chages
This commit is contained in:
1 parent
1dbbe04d59
commit
db485056e0
12 files changed
+140
-63
No files matched your search
@@ -1,16 +1,20 @@
|
||||
import './styles.css'
|
||||
|
||||
import Link from 'next/link'
|
||||
import cx from 'classnames'
|
||||
|
||||
export type ButtonProps = {
|
||||
style?: React.CSSProperties
|
||||
href?: string
|
||||
theme?: 'default' | 'ghost'
|
||||
size?: 'default' | 'small'
|
||||
}
|
||||
|
||||
export const Button: React.FC<ButtonProps> = props => {
|
||||
export const Button: React.FC<ButtonProps> = ({ size='default', theme = 'default', ...props }) => {
|
||||
if (props.href) {
|
||||
return (
|
||||
<Link href={props.href}>
|
||||
<a className={'button invisible'} style={props.style}>
|
||||
<a className={cx('button', theme, size)} style={props.style}>
|
||||
{props.children}
|
||||
</a>
|
||||
</Link>
|
||||
@@ -22,4 +26,5 @@ export const Button: React.FC<ButtonProps> = props => {
|
||||
{props.children}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user