Skip to content

Commit

Permalink
Merge pull request #6487 from ethereum/migrateCardComponentToTypeScript
Browse files Browse the repository at this point in the history
Refactor Card component to TS
  • Loading branch information
pettinarip authored May 30, 2022
2 parents f21c90f + 3c1d3d8 commit 162a195
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/Card.js → src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,20 @@ const Description = styled.p`

const TopContent = styled.div``

const Card = ({ emoji, title, description, children, className }) => (
export interface IProps {
emoji?: string
title: string
description: string
className?: string
}

const Card: React.FC<IProps> = ({
emoji,
title,
description,
children,
className,
}) => (
<StyledCard className={className}>
<TopContent>
{emoji && <Emoji size={3} text={emoji} mb="1rem" />}
Expand Down

0 comments on commit 162a195

Please sign in to comment.