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 {
|
interface Props {
|
||||||
variant?: 'outline' | 'text' | 'action';
|
variant?: 'outline' | 'text' | 'action';
|
||||||
|
type?: 'button' | 'submit';
|
||||||
link?: string;
|
link?: string;
|
||||||
dark?: boolean;
|
dark?: boolean;
|
||||||
}
|
}
|
||||||
@@ -36,6 +37,7 @@ const Btn = styled.button<Props>`
|
|||||||
|
|
||||||
const MDXButton: FC<Props & { className?: string }> = ({
|
const MDXButton: FC<Props & { className?: string }> = ({
|
||||||
variant = 'text',
|
variant = 'text',
|
||||||
|
type = 'button',
|
||||||
link,
|
link,
|
||||||
children,
|
children,
|
||||||
className
|
className
|
||||||
@@ -45,6 +47,7 @@ const MDXButton: FC<Props & { className?: string }> = ({
|
|||||||
return (
|
return (
|
||||||
<Btn
|
<Btn
|
||||||
variant={variant}
|
variant={variant}
|
||||||
|
type={type}
|
||||||
dark={dark}
|
dark={dark}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (link) window.open(link, '_blank');
|
if (link) window.open(link, '_blank');
|
||||||
|
|||||||
Reference in New Issue
Block a user