+ Gas fee estimation for this artwork
+
+ An error occurred while estimating the gas fee for this artwork, please + try again. +
+ ) : ( +Please connect your wallet to get a gas fee estimate for this artwork
+ ) +} diff --git a/src/components/@shared/FormFields/Nft/index.module.css b/src/components/@shared/FormFields/Nft/index.module.css index dedd36f58..01ad64eda 100644 --- a/src/components/@shared/FormFields/Nft/index.module.css +++ b/src/components/@shared/FormFields/Nft/index.module.css @@ -21,14 +21,23 @@ position: relative; } -.refresh { +.actions { position: absolute; - right: calc(var(--spacer) / 4); - bottom: calc(var(--spacer) / 4); + left: 0; + bottom: 0; + padding: 0 calc(var(--spacer) / 4); + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; +} + +.actions svg { + margin: 0; + fill: var(--font-color-text); } .refresh svg { - fill: var(--brand-pink); - width: var(--font-size-mini); - height: var(--font-size-mini); + transform: scale(0.9); + transform-origin: center; } diff --git a/src/components/@shared/FormFields/Nft/index.tsx b/src/components/@shared/FormFields/Nft/index.tsx index 109e22bf2..61f6bd6ff 100644 --- a/src/components/@shared/FormFields/Nft/index.tsx +++ b/src/components/@shared/FormFields/Nft/index.tsx @@ -5,35 +5,43 @@ import { useField } from 'formik' import React, { ReactElement, useEffect } from 'react' import Refresh from '@images/refresh.svg' import styles from './index.module.css' +import Tooltip from '@shared/atoms/Tooltip' +import TxFee from './TxFee' export default function Nft(props: InputProps): ReactElement { const [field, meta, helpers] = useField(props.name) + const refreshNftMetadata = () => { + const nftMetadata = generateNftMetadata() + helpers.setValue({ ...nftMetadata }) + } + // Generate on first mount useEffect(() => { if (field.value?.name !== '') return - const nftOptions = generateNftMetadata() - helpers.setValue({ ...nftOptions }) + refreshNftMetadata() }, [field.value?.name]) return (