mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Update mdx button props
This commit is contained in:
@@ -4,6 +4,7 @@ import styled from 'styled-components';
|
||||
|
||||
interface Props {
|
||||
variant?: 'outline' | 'text' | 'action';
|
||||
type?: 'button' | 'submit';
|
||||
link?: string;
|
||||
dark?: boolean;
|
||||
}
|
||||
@@ -36,6 +37,7 @@ const Btn = styled.button<Props>`
|
||||
|
||||
const MDXButton: FC<Props & { className?: string }> = ({
|
||||
variant = 'text',
|
||||
type = 'button',
|
||||
link,
|
||||
children,
|
||||
className
|
||||
@@ -45,6 +47,7 @@ const MDXButton: FC<Props & { className?: string }> = ({
|
||||
return (
|
||||
<Btn
|
||||
variant={variant}
|
||||
type={type}
|
||||
dark={dark}
|
||||
onClick={() => {
|
||||
if (link) window.open(link, '_blank');
|
||||
|
||||
Reference in New Issue
Block a user