@xylabs/sdk-react 2.9.33 → 2.9.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs5/components/EthAccount/EthAccount.stories.d.ts +3 -1
- package/dist/cjs5/components/EthAccount/EthAccountProps.d.ts +1 -0
- package/dist/cjs5/components/LinkEx/LinkToEx.d.ts +4 -2
- package/dist/cjs5/components/LinkEx/index.d.ts +1 -2
- package/dist/cjs5/index.js +12 -4
- package/dist/cjs5/index.js.map +1 -1
- package/dist/components/BasePage/BasePage.stories.js +2 -1
- package/dist/components/BasePage/BasePage.stories.js.map +1 -1
- package/dist/components/EthAccount/EthAccount.js +2 -2
- package/dist/components/EthAccount/EthAccount.js.map +1 -1
- package/dist/components/EthAccount/EthAccount.stories.d.ts +3 -1
- package/dist/components/EthAccount/EthAccount.stories.js +18 -1
- package/dist/components/EthAccount/EthAccount.stories.js.map +1 -1
- package/dist/components/EthAccount/EthAccountProps.d.ts +1 -0
- package/dist/components/LinkEx/LinkToEx.d.ts +4 -2
- package/dist/components/LinkEx/LinkToEx.js +10 -3
- package/dist/components/LinkEx/LinkToEx.js.map +1 -1
- package/dist/components/LinkEx/index.d.ts +1 -2
- package/dist/components/LinkEx/index.js +1 -2
- package/dist/components/LinkEx/index.js.map +1 -1
- package/dist/esm2015/components/EthAccount/EthAccount.stories.d.ts +3 -1
- package/dist/esm2015/components/EthAccount/EthAccountProps.d.ts +1 -0
- package/dist/esm2015/components/LinkEx/LinkToEx.d.ts +4 -2
- package/dist/esm2015/components/LinkEx/index.d.ts +1 -2
- package/dist/esm2015/index.js +12 -5
- package/dist/esm2015/index.js.map +1 -1
- package/dist/esm2017/components/EthAccount/EthAccount.stories.d.ts +3 -1
- package/dist/esm2017/components/EthAccount/EthAccountProps.d.ts +1 -0
- package/dist/esm2017/components/LinkEx/LinkToEx.d.ts +4 -2
- package/dist/esm2017/components/LinkEx/index.d.ts +1 -2
- package/dist/esm2017/index.js +12 -5
- package/dist/esm2017/index.js.map +1 -1
- package/dist/esm5/components/EthAccount/EthAccount.stories.d.ts +3 -1
- package/dist/esm5/components/EthAccount/EthAccountProps.d.ts +1 -0
- package/dist/esm5/components/LinkEx/LinkToEx.d.ts +4 -2
- package/dist/esm5/components/LinkEx/index.d.ts +1 -2
- package/dist/esm5/index.js +12 -5
- package/dist/esm5/index.js.map +1 -1
- package/dist/node/components/EthAccount/EthAccount.stories.d.ts +3 -1
- package/dist/node/components/EthAccount/EthAccountProps.d.ts +1 -0
- package/dist/node/components/LinkEx/LinkToEx.d.ts +4 -2
- package/dist/node/components/LinkEx/index.d.ts +1 -2
- package/dist/node/index.js +12 -4
- package/dist/node/index.js.map +1 -1
- package/dist/node-esm/components/EthAccount/EthAccount.stories.d.ts +3 -1
- package/dist/node-esm/components/EthAccount/EthAccountProps.d.ts +1 -0
- package/dist/node-esm/components/LinkEx/LinkToEx.d.ts +4 -2
- package/dist/node-esm/components/LinkEx/index.d.ts +1 -2
- package/dist/node-esm/index.js +12 -5
- package/dist/node-esm/index.js.map +1 -1
- package/package.json +15 -12
- package/src/components/BasePage/BasePage.stories.tsx +6 -1
- package/src/components/EthAccount/EthAccount.stories.tsx +20 -1
- package/src/components/EthAccount/EthAccount.tsx +2 -1
- package/src/components/EthAccount/EthAccountProps.tsx +1 -0
- package/src/components/LinkEx/LinkToEx.tsx +11 -4
- package/src/components/LinkEx/index.ts +1 -3
|
@@ -14,6 +14,7 @@ const EthAccount: React.FC<EthAccountProps> = ({
|
|
|
14
14
|
icon = false,
|
|
15
15
|
iconSize = 16,
|
|
16
16
|
iconOnly = false,
|
|
17
|
+
shortenedLength,
|
|
17
18
|
addressLength = 'auto',
|
|
18
19
|
fontFamily = '"Source Code Pro",monospace',
|
|
19
20
|
toEtherScan,
|
|
@@ -40,7 +41,7 @@ const EthAccount: React.FC<EthAccountProps> = ({
|
|
|
40
41
|
addressLength === 'long'
|
|
41
42
|
? addressToDisplay.toString()
|
|
42
43
|
: addressLength === 'short'
|
|
43
|
-
? addressToDisplay.toShortString()
|
|
44
|
+
? addressToDisplay.toShortString(shortenedLength)
|
|
44
45
|
: large
|
|
45
46
|
? addressToDisplay.toString()
|
|
46
47
|
: addressToDisplay.toShortString()
|
|
@@ -3,11 +3,18 @@ import React from 'react'
|
|
|
3
3
|
import { Link as RouterLink, To } from 'react-router-dom'
|
|
4
4
|
|
|
5
5
|
interface Props extends LinkProps {
|
|
6
|
-
to
|
|
6
|
+
to?: To
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const LinkEx: React.FC<Props> = ({ to, ...props }) => {
|
|
10
|
+
if (to) {
|
|
11
|
+
return <Link component={RouterLink} to={to} {...props} />
|
|
12
|
+
} else {
|
|
13
|
+
return <Link {...props} />
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
/** @deprecated use LinkEx instead */
|
|
18
|
+
const LinkToEx = LinkEx
|
|
19
|
+
|
|
20
|
+
export { LinkEx, LinkToEx }
|