diff --git a/src/components/ActionCard.js b/src/components/ActionCard.tsx similarity index 87% rename from src/components/ActionCard.js rename to src/components/ActionCard.tsx index 2706ad116aa..e7963998613 100644 --- a/src/components/ActionCard.js +++ b/src/components/ActionCard.tsx @@ -17,7 +17,10 @@ const ChildrenContainer = styled.div` margin-top: 2rem; ` -const ImageWrapper = styled.div` +const ImageWrapper = styled.div<{ + isRight: boolean | undefined + isBottom: boolean | undefined +}>` display: flex; flex-direction: row; justify-content: ${(props) => (props.isRight ? `flex-end` : `center`)}; @@ -62,7 +65,18 @@ const Card = styled(Link)` } ` -const ActionCard = ({ +export interface IProps { + to: string + alt?: string + image: string + title: string + description: string + className?: string + isRight?: boolean + isBottom?: boolean +} + +const ActionCard: React.FC = ({ to, alt, image, @@ -71,7 +85,7 @@ const ActionCard = ({ children, className, isRight, - isBottom = true, + isBottom = true }) => { const isImageURL = typeof image === "string" && image.includes("http") return (