From 35cf521b403dbea454264f223583c9178cf0e954 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 30 Aug 2019 17:50:05 +0400 Subject: [PATCH] update provider details --- src/components/Header/component/Provider.jsx | 8 ++++---- .../Header/component/ProviderDetails/UserDetails.jsx | 4 ++-- .../Header/component/ProviderInfo/ProviderAccesible.jsx | 6 +++--- src/components/layout/Paragraph/index.jsx | 2 +- src/components/layout/Paragraph/index.scss | 4 ++++ 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/Header/component/Provider.jsx b/src/components/Header/component/Provider.jsx index 76fd061f..dda09c76 100644 --- a/src/components/Header/component/Provider.jsx +++ b/src/components/Header/component/Provider.jsx @@ -38,21 +38,21 @@ const styles = () => ({ type ProviderRef = { current: null | HTMLDivElement } class Provider extends React.Component { + myRef: ProviderRef + constructor(props: Props) { super(props) this.myRef = React.createRef() } - myRef: ProviderRef - render() { const { open, toggle, children, classes, info, } = this.props return ( - + <>
{info} @@ -62,7 +62,7 @@ class Provider extends React.Component {
{children(this.myRef)} -
+ ) } } diff --git a/src/components/Header/component/ProviderDetails/UserDetails.jsx b/src/components/Header/component/ProviderDetails/UserDetails.jsx index 912a396e..1bdd6027 100644 --- a/src/components/Header/component/ProviderDetails/UserDetails.jsx +++ b/src/components/Header/component/ProviderDetails/UserDetails.jsx @@ -104,7 +104,7 @@ const UserDetails = ({ provider, connected, network, userAddress, classes, onDisconnect, }: Props) => { const status = connected ? 'Connected' : 'Connection error' - const address = userAddress ? shortVersionOf(userAddress, 6) : 'Address not available' + const address = userAddress ? shortVersionOf(userAddress, 4) : 'Address not available' const identiconAddress = userAddress || 'random' const color = connected ? 'primary' : 'warning' @@ -119,7 +119,7 @@ const UserDetails = ({ )} - + {address} {userAddress && ( diff --git a/src/components/Header/component/ProviderInfo/ProviderAccesible.jsx b/src/components/Header/component/ProviderInfo/ProviderAccesible.jsx index edfac147..7d0e34d9 100644 --- a/src/components/Header/component/ProviderInfo/ProviderAccesible.jsx +++ b/src/components/Header/component/ProviderInfo/ProviderAccesible.jsx @@ -48,7 +48,7 @@ const ProviderInfo = ({ provider, network, userAddress, connected, classes, }: Props) => { const providerText = `${provider} [${network}]` - const cutAddress = connected ? shortVersionOf(userAddress, 6) : 'Connection Error' + const cutAddress = connected ? shortVersionOf(userAddress, 4) : 'Connection Error' const color = connected ? 'primary' : 'warning' const identiconAddress = userAddress || 'random' @@ -62,10 +62,10 @@ const ProviderInfo = ({ )} {!connected && } - + {providerText} - + {cutAddress} diff --git a/src/components/layout/Paragraph/index.jsx b/src/components/layout/Paragraph/index.jsx index af8e9584..f72c869c 100644 --- a/src/components/layout/Paragraph/index.jsx +++ b/src/components/layout/Paragraph/index.jsx @@ -10,7 +10,7 @@ type Props = { noMargin?: boolean, noPadding?: boolean, weight?: 'light' | 'regular' | 'bolder' | 'bold', - size?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl', + size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl', color?: 'soft' | 'medium' | 'dark' | 'white' | 'fancy' | 'primary' | 'secondary' | 'warning' | 'disabled' | 'error', transform?: 'capitalize' | 'lowercase' | 'uppercase', children: React.Node, diff --git a/src/components/layout/Paragraph/index.scss b/src/components/layout/Paragraph/index.scss index ad7c6709..a128caa9 100644 --- a/src/components/layout/Paragraph/index.scss +++ b/src/components/layout/Paragraph/index.scss @@ -72,6 +72,10 @@ text-align: right; } +.xs { + font-size: $extraSmallFontSize; +} + .sm { font-size: $smallFontSize; }