mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Update dependencies and fix introduced errors
This commit is contained in:
@@ -1,24 +1,17 @@
|
||||
import { FC, useContext } from 'react';
|
||||
import { ThemeContext } from '../../styles/theme';
|
||||
import { Props } from './types';
|
||||
import { Btn } from './styles';
|
||||
import Link from 'next/link';
|
||||
import { StyledButton } from './styles';
|
||||
|
||||
const Button: FC<Props & { className?: string }> = ({
|
||||
const Button = ({
|
||||
variant = 'text',
|
||||
href,
|
||||
target,
|
||||
onClick,
|
||||
children,
|
||||
className
|
||||
}) => {
|
||||
return (
|
||||
<Link href={href} passHref>
|
||||
<Btn as='a' target={target} variant={variant} onClick={onClick} className={className}>
|
||||
{children}
|
||||
</Btn>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
}: Props) => (
|
||||
<StyledButton href={href} target={target} className={className} onClick={onClick} variant={variant}>
|
||||
{children}
|
||||
</StyledButton>
|
||||
);
|
||||
|
||||
export default Button;
|
||||
|
||||
Reference in New Issue
Block a user