diff --git a/content/price.json b/content/price.json index 7c00d61a9..9ae6f8acc 100644 --- a/content/price.json +++ b/content/price.json @@ -47,5 +47,9 @@ }, "action": "Approve & Remove" } + }, + "trade": { + "action": "Approve & Swap", + "warning": "Use at your own risk. Please familiarize yourself [with the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13) and the [Terms of Use](/terms)." } } diff --git a/package-lock.json b/package-lock.json index 42f512d17..ff928b066 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3550,9 +3550,9 @@ "integrity": "sha512-p0oOHXr60hXZuLNsQ/PsOQtCfia79thm7MjPxTrnnBvD+csJoHzARYMB0IFj/KTw6U5vLXODgjJAn8x6QksLwg==" }, "@oceanprotocol/lib": { - "version": "0.9.12", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.9.12.tgz", - "integrity": "sha512-R52kWSwwpKNzNHfnNbF6seFPvXEtExK3bWIi4V4eIkgmAf272sa6PVza4mJrtEpTAS1WcJv5ihF7cczIDecxbg==", + "version": "0.9.14", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.9.14.tgz", + "integrity": "sha512-UDJpDHqJ5o6O/cOdTuyxhABaebQM1vz+RyfC3zVRSdz5Ke/5xjAChk+3LlYbXBA8VaacxioYa4OlaJLE5uB+Qg==", "requires": { "@ethereum-navigator/navigator": "^0.5.0", "@oceanprotocol/contracts": "^0.5.7", diff --git a/package.json b/package.json index 7cec6146b..db1f92f33 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@coingecko/cryptoformat": "^0.4.2", "@loadable/component": "^5.14.1", "@oceanprotocol/art": "^3.0.0", - "@oceanprotocol/lib": "^0.9.12", + "@oceanprotocol/lib": "^0.9.14", "@oceanprotocol/list-datapartners": "^1.0.3", "@oceanprotocol/react": "^0.3.19", "@oceanprotocol/typographies": "^0.1.0", diff --git a/src/@types/TokenBalance.d.ts b/src/@types/TokenBalance.d.ts new file mode 100644 index 000000000..1feb8c8df --- /dev/null +++ b/src/@types/TokenBalance.d.ts @@ -0,0 +1,4 @@ +export default interface TokenBalance { + ocean: number + datatoken: number +} diff --git a/src/components/atoms/Input/InputElement.module.css b/src/components/atoms/Input/InputElement.module.css index a85223765..3fd57b9b0 100644 --- a/src/components/atoms/Input/InputElement.module.css +++ b/src/components/atoms/Input/InputElement.module.css @@ -26,7 +26,7 @@ .input::placeholder { font-family: var(--font-family-base); font-size: var(--font-size-base); - color: var(--brand-grey-light); + color: var(--color-secondary); font-weight: var(--font-weight-base); transition: 0.2s ease-out; opacity: 0.7; @@ -167,6 +167,7 @@ .postfixGroup { display: inline-flex; align-items: center; + width: 100%; } .prefixGroup input { @@ -259,6 +260,31 @@ input[type='range']::-moz-range-track { /* Size modifiers */ +.mini, +.select.mini { + font-size: var(--font-size-mini); + height: 24px; + padding: calc(var(--spacer) / 8); +} + +.mini::placeholder { + font-size: var(--font-size-mini); +} + +.prefix.mini, +.postfix.mini { + height: 24px; + font-size: var(--font-size-mini); +} + +.select.mini { + padding-right: 2rem; + + /* custom arrow */ + background-position: calc(100% - 14px) 0.6rem, calc(100% - 9px) 0.6rem, 100% 0; + background-size: 5px 5px, 5px 5px, 1.75rem 3rem; +} + .small, .select.small { font-size: var(--font-size-small); diff --git a/src/components/atoms/Input/InputElement.tsx b/src/components/atoms/Input/InputElement.tsx index f44a185f1..d136e22e4 100644 --- a/src/components/atoms/Input/InputElement.tsx +++ b/src/components/atoms/Input/InputElement.tsx @@ -26,6 +26,7 @@ const DefaultInput = ({ export default function InputElement({ type, options, + sortOptions, name, prefix, postfix, @@ -40,22 +41,25 @@ export default function InputElement({ const styleClasses = cx({ select: true, [size]: size }) switch (type) { - case 'select': + case 'select': { + const sortedOptions = + !sortOptions && sortOptions === false + ? options + : options.sort((a: string, b: string) => a.localeCompare(b)) return ( ) + } case 'textarea': return (