Update mdx button props

This commit is contained in:
Hazem Krimi
2021-03-16 19:22:36 +01:00
parent f6cb015b90
commit ee599d1796
+3
View File
@@ -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');