mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Add prettier configuration
This commit is contained in:
@@ -4,33 +4,39 @@ import { Props } from './types';
|
||||
import { StyledLink, StyledButton } from './styles';
|
||||
|
||||
const MDXButton = ({
|
||||
variant = 'text',
|
||||
type = 'button',
|
||||
link,
|
||||
target,
|
||||
children,
|
||||
disabled,
|
||||
className
|
||||
variant = 'text',
|
||||
type = 'button',
|
||||
link,
|
||||
target,
|
||||
children,
|
||||
disabled,
|
||||
className,
|
||||
}: Props) => {
|
||||
const { mode } = useContext(ThemeContext);
|
||||
const { mode } = useContext(ThemeContext);
|
||||
|
||||
return link ? (
|
||||
<StyledLink
|
||||
href={link}
|
||||
target={target}
|
||||
variant={variant}
|
||||
type={type}
|
||||
mode={mode}
|
||||
disabled={disabled}
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</StyledLink>
|
||||
) : (
|
||||
<StyledButton variant={variant} type={type} mode={mode} disabled={disabled} className={className}>
|
||||
{children}
|
||||
</StyledButton>
|
||||
);
|
||||
return link ? (
|
||||
<StyledLink
|
||||
href={link}
|
||||
target={target}
|
||||
variant={variant}
|
||||
type={type}
|
||||
mode={mode}
|
||||
disabled={disabled}
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</StyledLink>
|
||||
) : (
|
||||
<StyledButton
|
||||
variant={variant}
|
||||
type={type}
|
||||
mode={mode}
|
||||
disabled={disabled}
|
||||
className={className}
|
||||
>
|
||||
{children}
|
||||
</StyledButton>
|
||||
);
|
||||
};
|
||||
|
||||
export default MDXButton;
|
||||
|
||||
Reference in New Issue
Block a user