diff --git a/components/MDXButton.tsx b/components/MDXButton.tsx index 9d3ba7d..6fac81a 100644 --- a/components/MDXButton.tsx +++ b/components/MDXButton.tsx @@ -7,6 +7,7 @@ interface Props { type?: 'button' | 'submit'; link?: string; dark?: boolean; + disabled?: boolean; } const Btn = styled.button` @@ -29,13 +30,20 @@ const Btn = styled.button` ['action', 'outline'].includes(variant as string) ? 'center' : 'left'}; transition: color 250ms ease-in-out; + ${({ disabled }) => + disabled && + ` + background: gray; + cursor: default; + `} + @media (max-width: 768px) { padding: ${({ variant }) => ['action', 'outline'].includes(variant as string) ? '.5rem .75rem' : '0rem'}; } `; -const MDXButton: FC = ({ +const MDXButton: FC = ({ variant = 'text', type = 'button', link,