diff --git a/.vscode/settings.json b/.vscode/settings.json index 112501c360..8ee29ee374 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,4 +15,7 @@ "typescript.suggest.paths": true, "typescript.suggest.enabled": true, "typescript.suggest.completeFunctionCalls": true, + "[typescriptreact]": { + "editor.defaultFormatter": "vscode.typescript-language-features" + }, } diff --git a/packages/app/src/systems/Send/components/NetworkStatus/NetworkStatus.tsx b/packages/app/src/systems/Send/components/NetworkStatus/NetworkStatus.tsx new file mode 100644 index 0000000000..fd536ba509 --- /dev/null +++ b/packages/app/src/systems/Send/components/NetworkStatus/NetworkStatus.tsx @@ -0,0 +1,56 @@ +import { cssObj } from '@fuel-ui/css'; +import { Box, Text } from '@fuel-ui/react'; +import { useState } from 'react'; +import { MotionStack, animations } from '~/systems/Core'; + +type NetworkStatusProps = { + isVisible?: boolean; +}; + +type NetworkStatus = 'busy' | 'normal'; + +export const NetworkStatus = ({ isVisible = false }: NetworkStatusProps) => { + const [status, _setStatus] = useState('normal'); + return ( + + + Status: + + + + + + ); +}; + +const styles = { + title: cssObj({ + pt: '$2', + color: '$intentsBase12', + lineHeight: '$none', + }), + busy: cssObj({ + width: '$3', + height: '$3', + backgroundColor: '$scalesRed9', + borderRadius: '$full', + alignItems: 'center', + }), + normal: cssObj({ + width: '$3', + height: '$3', + backgroundColor: '$scalesGreen9', + borderRadius: '$full', + alignItems: 'center', + }), + bar: cssObj({ + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + gap: '$2', + }), +}; diff --git a/packages/app/src/systems/Send/components/NetworkStatus/index.tsx b/packages/app/src/systems/Send/components/NetworkStatus/index.tsx new file mode 100644 index 0000000000..4328d739ae --- /dev/null +++ b/packages/app/src/systems/Send/components/NetworkStatus/index.tsx @@ -0,0 +1 @@ +export * from './NetworkStatus'; diff --git a/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx b/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx index 49d118ca86..e7f31c4947 100644 --- a/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx +++ b/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx @@ -1,9 +1,10 @@ import { cssObj } from '@fuel-ui/css'; -import { Alert, Box, Form, Input, Text } from '@fuel-ui/react'; +import { Alert, Box, Form, HStack, Input, Text } from '@fuel-ui/react'; import { motion } from 'framer-motion'; import { type BN, bn } from 'fuels'; import { useEffect, useMemo, useRef, useState } from 'react'; import { AssetSelect } from '~/systems/Asset'; + import { ControlledField, Layout, @@ -16,6 +17,7 @@ import { useController, useWatch } from 'react-hook-form'; import { InputAmount } from '~/systems/Core/components/InputAmount/InputAmount'; import { TxFeeOptions } from '~/systems/Transaction/components/TxFeeOptions/TxFeeOptions'; import type { UseSendReturn } from '../../hooks'; +import { NetworkStatus } from '../NetworkStatus'; const MotionContent = motion(Layout.Content); @@ -198,9 +200,12 @@ export function SendSelect({ regularTip && fastTip && ( - - Fee (network) - + + + Fee (network) + + +