diff --git a/packages/mixer/src/components/Withdraw/Withdraw.tsx b/packages/mixer/src/components/Withdraw/Withdraw.tsx index 961bd12cb7..9e845471cc 100644 --- a/packages/mixer/src/components/Withdraw/Withdraw.tsx +++ b/packages/mixer/src/components/Withdraw/Withdraw.tsx @@ -9,6 +9,7 @@ import { Modal } from '@webb-dapp/ui-components/Modal/Modal'; import React, { useState } from 'react'; import styled from 'styled-components'; import { WithdrawState } from '@webb-dapp/react-environment'; +import { InputSection } from '@webb-dapp/ui-components/Inputs/InputSection/InputSection'; const WithdrawWrapper = styled.div``; type WithdrawProps = {}; @@ -24,23 +25,28 @@ export const Withdraw: React.FC = () => { return ( - + + + - - { - setRecipient(event.target.value as string); - }} - fullWidth - placeholder={`Enter account address`} - /> - - {validationErrors.recipient} - - + + + { + setRecipient(event.target.value as string); + }} + inputProps={{style: {fontSize: 14}}} + fullWidth + placeholder={`Enter account address`} + /> + + {validationErrors.recipient} + + + diff --git a/packages/ui-components/src/Inputs/InputLabel/InputLabel.tsx b/packages/ui-components/src/Inputs/InputLabel/InputLabel.tsx index fad1c03a2c..7ba88e05b8 100644 --- a/packages/ui-components/src/Inputs/InputLabel/InputLabel.tsx +++ b/packages/ui-components/src/Inputs/InputLabel/InputLabel.tsx @@ -2,6 +2,7 @@ import { Pallet } from '@webb-dapp/ui-components/styling/colors'; import React from 'react'; import styled, { css } from 'styled-components'; import { FontFamilies } from '@webb-dapp/ui-components/styling/fonts/font-families.enum'; +import { Typography } from '@material-ui/core'; type LabelStatus = 'initial' | 'highlighted' | 'error'; @@ -15,18 +16,10 @@ interface InputLabelProps { } const InputLabelRoot = styled.label` - ${({ theme }: { theme: Pallet }) => css` - border: 2px solid ${theme.borderColor2}; - color: ${theme.primaryText}; - background: ${theme.layer2Background}; - `} - font-size: 13px; - display: block; - padding: 10px; - border-radius: 10px; - min-height: 80px; + .label-content { + font-size: 16px; font-family: ${FontFamilies.AvenirNext}; font-weight: 300; display: block; @@ -36,7 +29,7 @@ const InputLabelRoot = styled.label` export const InputLabel: React.FC = ({ children, label, state = 'initial' }) => { return ( - {label} + {label} {children} ); diff --git a/packages/ui-components/src/Inputs/InputSection/InputSection.tsx b/packages/ui-components/src/Inputs/InputSection/InputSection.tsx new file mode 100644 index 0000000000..3876e6c0e8 --- /dev/null +++ b/packages/ui-components/src/Inputs/InputSection/InputSection.tsx @@ -0,0 +1,13 @@ +import { Pallet } from '@webb-dapp/ui-components/styling/colors'; +import styled, { css } from 'styled-components'; + +export const InputSection = styled.div` + ${({ theme }: { theme: Pallet }) => css` + border: 2px solid ${theme.borderColor2}; + color: ${theme.primaryText}; + background: ${theme.layer2Background}; + `} + padding: 10px; + border-radius: 10px; + min-height: 80px; +`; diff --git a/packages/ui-components/src/Inputs/MixerGroupSelect/MixerGroupSelect.tsx b/packages/ui-components/src/Inputs/MixerGroupSelect/MixerGroupSelect.tsx index 4700e1c163..0b14887b2b 100644 --- a/packages/ui-components/src/Inputs/MixerGroupSelect/MixerGroupSelect.tsx +++ b/packages/ui-components/src/Inputs/MixerGroupSelect/MixerGroupSelect.tsx @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/indent */ import { MixerSize } from '@webb-dapp/react-environment/webb-context'; import { InputLabel } from '@webb-dapp/ui-components/Inputs/InputLabel/InputLabel'; +import { InputSection } from '../InputSection/InputSection'; import { Pallet } from '@webb-dapp/ui-components/styling/colors'; import { FontFamilies } from '@webb-dapp/ui-components/styling/fonts/font-families.enum'; import React, { useEffect, useMemo } from 'react'; @@ -71,25 +72,27 @@ export const MixerGroupSelect: React.FC = ({ items, onCha }, [checkedIndex, items]); return ( - - - {mixerSizes.map(({ id, selected, title }) => { - return ( - { - onChange?.({ - title, - id, - }); - }} - > - {title} - - ); - })} - - + + + + {mixerSizes.map(({ id, selected, title }) => { + return ( + { + onChange?.({ + title, + id, + }); + }} + > + {title} + + ); + })} + + + ); }; diff --git a/packages/ui-components/src/Inputs/TokenInput/TokenInput.tsx b/packages/ui-components/src/Inputs/TokenInput/TokenInput.tsx index a58b6705d9..effcfc4706 100644 --- a/packages/ui-components/src/Inputs/TokenInput/TokenInput.tsx +++ b/packages/ui-components/src/Inputs/TokenInput/TokenInput.tsx @@ -71,7 +71,7 @@ const AccountManagerWrapper = styled.div` height: 0; background: #ffffff; position: relative; - top: -26.5px; + top: -52px; `; type TokenInputProps = { diff --git a/packages/ui-components/src/Inputs/WalletTokenInput/WalletTokenInput.tsx b/packages/ui-components/src/Inputs/WalletTokenInput/WalletTokenInput.tsx index 14826fdace..830a4a2c0b 100644 --- a/packages/ui-components/src/Inputs/WalletTokenInput/WalletTokenInput.tsx +++ b/packages/ui-components/src/Inputs/WalletTokenInput/WalletTokenInput.tsx @@ -3,6 +3,7 @@ import { Currency } from '@webb-dapp/react-environment/types/currency'; import React, { useMemo } from 'react'; import styled from 'styled-components'; +import { InputSection } from '../InputSection/InputSection'; import { InputLabel } from '../InputLabel/InputLabel'; import { TokenInput } from '../TokenInput/TokenInput'; import { WalletSelect } from '../WalletSelect/WalletSelect'; @@ -11,7 +12,8 @@ const WalletTokenInputWrapper = styled.div` display: flex; align-items: center; justify-content: space-between; - min-height: 60px; + height: 100%; + width: 100%; `; type WalletTokenInputProps = { setSelectedToken(token: Currency): void; @@ -25,12 +27,18 @@ export const WalletTokenInput: React.FC = ({ selectedToke }, [activeChain]); const active = useMemo(() => selectedToken ?? allCurrencies[0], [allCurrencies, selectedToken]); return ( - + - + + + - + + {/* used for positioning the token input label */} +
+ +
-
+ ); }; diff --git a/packages/ui-components/src/styling/themes/overides/light-theme-overrides.ts b/packages/ui-components/src/styling/themes/overides/light-theme-overrides.ts index 6120a3d273..44d49a124a 100644 --- a/packages/ui-components/src/styling/themes/overides/light-theme-overrides.ts +++ b/packages/ui-components/src/styling/themes/overides/light-theme-overrides.ts @@ -30,5 +30,11 @@ export const lightMainThemeOverrides: ThemeOptions['overrides'] = { h6: { fontSize: '.9rem', }, + caption: { + fontSize: '.8rem', + }, + body1: { + fontSize: '1rem', + }, }, };