From a021fb3f13fc5485e06484b1185b488e159fac39 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 6 Aug 2020 12:44:25 +0200 Subject: [PATCH 1/5] refactor wallet popup into generic tooltip component --- src/components/atoms/Input/Label.tsx | 6 +- src/components/atoms/Tooltip.module.css | 41 +++++++++ src/components/atoms/Tooltip.tsx | 89 +++++++++++++++---- .../molecules/FormFields/Price/Advanced.tsx | 5 +- .../molecules/Wallet/Details.module.css | 35 +------- src/components/molecules/Wallet/Details.tsx | 5 +- src/components/molecules/Wallet/index.tsx | 55 +----------- 7 files changed, 126 insertions(+), 110 deletions(-) diff --git a/src/components/atoms/Input/Label.tsx b/src/components/atoms/Input/Label.tsx index 40e06326b..4a5ed2006 100644 --- a/src/components/atoms/Input/Label.tsx +++ b/src/components/atoms/Input/Label.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, { ReactElement, ReactNode } from 'react' import styles from './Label.module.css' const Label = ({ @@ -7,9 +7,9 @@ const Label = ({ ...props }: { required?: boolean - children: string + children: ReactNode htmlFor: string -}) => ( +}): ReactElement => (