diff --git a/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx b/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx index d36a06a9..2afc262a 100644 --- a/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx +++ b/src/ethereum/EthHashInfo/ethHashInfo.stories.tsx @@ -65,3 +65,7 @@ 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..87497b39 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,13 @@ const EthHashInfo = ({ )} - - {shortenHash - ? textShortener(hash, shortenHash + 2, shortenHash) - : hash} - + {showHash && ( + + {shortenHash + ? textShortener(hash, shortenHash + 2, shortenHash) + : hash} + + )} {showCopyBtn && } {explorerUrl && } {menuItems && } diff --git a/tests/__snapshots__/storybook.test.js.snap b/tests/__snapshots__/storybook.test.js.snap index 96dcc09a..b28680a4 100644 --- a/tests/__snapshots__/storybook.test.js.snap +++ b/tests/__snapshots__/storybook.test.js.snap @@ -5761,6 +5761,36 @@ exports[`Storyshots Ethereum/Eth hash Info Address 1`] = ` `; +exports[`Storyshots Ethereum/Eth hash Info With Avatar And Text 1`] = ` +
+
+ +
+
+

+ Owner 1 +

+
+
+
+`; + exports[`Storyshots Ethereum/Eth hash Info With Buttons 1`] = `