From 4f32d857dad58bca03311f5d33256d614a03cdf6 Mon Sep 17 00:00:00 2001 From: Joshua <30259508@cityofglacol.ac.uk> Date: Fri, 27 May 2022 18:54:20 +0100 Subject: [PATCH 1/2] Refactor Card component to TS --- src/components/{Card.js => Card.tsx} | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) rename src/components/{Card.js => Card.tsx} (77%) diff --git a/src/components/Card.js b/src/components/Card.tsx similarity index 77% rename from src/components/Card.js rename to src/components/Card.tsx index b43698cc8c0..9d7b325dd19 100644 --- a/src/components/Card.js +++ b/src/components/Card.tsx @@ -17,7 +17,20 @@ const Description = styled.p` const TopContent = styled.div`` -const Card = ({ emoji, title, description, children, className }) => ( +interface IProps { + emoji?: string + title: string + description: string + className?: string +} + +const Card: React.FC = ({ + emoji, + title, + description, + children, + className, +}) => ( {emoji && } From 3c1d3d8c42f8080c26b463507fd9595dd09f3a1b Mon Sep 17 00:00:00 2001 From: Joshua <62268199+minimalsm@users.noreply.github.com> Date: Fri, 27 May 2022 19:17:24 +0100 Subject: [PATCH 2/2] export interface Co-authored-by: Pablo Pettinari --- src/components/Card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 9d7b325dd19..ed3336950e4 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -17,7 +17,7 @@ const Description = styled.p` const TopContent = styled.div`` -interface IProps { +export interface IProps { emoji?: string title: string description: string