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:
@@ -35,11 +35,12 @@ const Btn = styled.button<Props>`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const MDXButton: FC<Props & { className?: string }> = ({
|
const MDXButton: FC<Props & { className?: string; disabled?: boolean }> = ({
|
||||||
variant = 'text',
|
variant = 'text',
|
||||||
type = 'button',
|
type = 'button',
|
||||||
link,
|
link,
|
||||||
children,
|
children,
|
||||||
|
disabled,
|
||||||
className
|
className
|
||||||
}) => {
|
}) => {
|
||||||
const { dark } = useContext(DarkModeContext);
|
const { dark } = useContext(DarkModeContext);
|
||||||
@@ -52,6 +53,7 @@ const MDXButton: FC<Props & { className?: string }> = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (link) window.open(link, '_blank');
|
if (link) window.open(link, '_blank');
|
||||||
}}
|
}}
|
||||||
|
disabled={disabled}
|
||||||
className={className}
|
className={className}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Reference in New Issue
Block a user