From 3343fc9a31d27d60ff76c18e0eb9003d5906d640 Mon Sep 17 00:00:00 2001 From: nicosampler Date: Fri, 23 Apr 2021 10:59:56 -0300 Subject: [PATCH 1/3] Feature: EthHasInfo add showHash property --- src/ethereum/EthHashInfo/ethHashInfo.stories.tsx | 9 +++++++++ src/ethereum/EthHashInfo/index.tsx | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx b/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx index d36a06a9..9ef498d4 100644 --- a/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx +++ b/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx @@ -65,3 +65,12 @@ export const WithMenu = (): React.ReactElement => { /> ); }; + +export const WithAvatarAndText = (): React.ReactElement => ( + +); diff --git a/src/ethereum/EthHashInfo/index.tsx b/src/ethereum/EthHashInfo/index.tsx index 4895d135..ec715883 100644 --- a/src/ethereum/EthHashInfo/index.tsx +++ b/src/ethereum/EthHashInfo/index.tsx @@ -42,12 +42,12 @@ const AddressContainer = styled.div` const StyledImg = styled.img<{ size: ThemeIdenticonSize }>` height: ${({ size, theme }) => theme.identicon.size[size]}; width: ${({ size, theme }) => theme.identicon.size[size]}; - border-radius: 50%; `; type Props = { className?: string; hash: string; + showHash?: boolean; shortenHash?: number; name?: string; textColor?: ThemeColors; @@ -62,6 +62,7 @@ type Props = { const EthHashInfo = ({ hash, + showHash = true, name, textColor = 'text', textSize = 'lg', @@ -92,11 +93,11 @@ const EthHashInfo = ({ )} - + {showHash && {shortenHash ? textShortener(hash, shortenHash + 2, shortenHash) : hash} - + } {showCopyBtn && } {explorerUrl && } {menuItems && } From fcedd67cc7fff274da32ca6d2f4e0dac1e1b1a20 Mon Sep 17 00:00:00 2001 From: nicosampler Date: Fri, 23 Apr 2021 11:53:07 -0300 Subject: [PATCH 2/3] update tests --- tests/__snapshots__/storybook.test.js.snap | 986 +++++++++++++-------- 1 file changed, 627 insertions(+), 359 deletions(-) diff --git a/tests/__snapshots__/storybook.test.js.snap b/tests/__snapshots__/storybook.test.js.snap index b33567d3..ba9c2184 100644 --- a/tests/__snapshots__/storybook.test.js.snap +++ b/tests/__snapshots__/storybook.test.js.snap @@ -38,7 +38,7 @@ exports[`Storyshots Data Display/Accordion Compact Accordion 1`] = ` className="MuiAccordionSummary-content" >
Some text
Some text
  • ,
    ,
    ,
    ,
    ,
    , @@ -6242,10 +6510,10 @@ Array [ exports[`Storyshots Inputs/Button Disabled Button 1`] = `
    ,