From 5fc2b879c7845f13acbd9e525e857b5ca4af0be9 Mon Sep 17 00:00:00 2001 From: Denis Nebytov Date: Thu, 16 Jan 2025 15:45:22 +0300 Subject: [PATCH 1/2] fix YOEXT-1107 --- .../app/components/swap/SwapInput.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/yoroi-extension/app/components/swap/SwapInput.js b/packages/yoroi-extension/app/components/swap/SwapInput.js index e9f0db4a38..4b927ba155 100644 --- a/packages/yoroi-extension/app/components/swap/SwapInput.js +++ b/packages/yoroi-extension/app/components/swap/SwapInput.js @@ -87,8 +87,8 @@ export default function SwapInput({ position: 'relative', bgcolor: 'ds.bg_color_max', columnGap: '6px', - rowGap: '8px', - maxHeight: '95px', + rowGap: '6px', + maxHeight: '80px', '&:hover': { borderColor: !error && 'grayscale.max', }, @@ -121,12 +121,13 @@ export default function SwapInput({ variant="body1" color="grayscale.max" placeholder="0" + padding="0" onChange={handleChange} value={disabled ? '' : value} onFocus={() => focusState.update(true)} onBlur={() => focusState.update(false)} /> - + { @@ -176,10 +185,10 @@ export default function SwapInput({ ) : ( - + )} - + {strings.currentBalance} {quantity || 0} {ticker} From 548f6cfe547af403659289198b909d28dd8c387a Mon Sep 17 00:00:00 2001 From: Denis Nebytov Date: Thu, 16 Jan 2025 17:53:32 +0300 Subject: [PATCH 2/2] fix YOEXT-1331 --- .../app/assets/images/calendar-24.inline.svg | 9 +++++ .../app/components/wallet/export/DateRange.js | 36 +++++++++++++------ 2 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 packages/yoroi-extension/app/assets/images/calendar-24.inline.svg diff --git a/packages/yoroi-extension/app/assets/images/calendar-24.inline.svg b/packages/yoroi-extension/app/assets/images/calendar-24.inline.svg new file mode 100644 index 0000000000..4cfc23b927 --- /dev/null +++ b/packages/yoroi-extension/app/assets/images/calendar-24.inline.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packages/yoroi-extension/app/components/wallet/export/DateRange.js b/packages/yoroi-extension/app/components/wallet/export/DateRange.js index 194902891a..2dd3dbdeb0 100644 --- a/packages/yoroi-extension/app/components/wallet/export/DateRange.js +++ b/packages/yoroi-extension/app/components/wallet/export/DateRange.js @@ -1,13 +1,14 @@ // @flow import { Component } from 'react'; import type { Node } from 'react'; -import TextField from '@mui/material/TextField'; import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'; import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import { DatePicker } from '@mui/x-date-pickers/DatePicker'; +import { DatePicker } from '@mui/x-date-pickers'; import { observer } from 'mobx-react'; import { defineMessages, intlShape } from 'react-intl'; import type { $npm$ReactIntl$IntlFormat } from 'react-intl'; +import { ReactComponent as CalendarIcon } from '../../../assets/images/calendar-24.inline.svg'; +import { styled, Box, TextField } from '@mui/material'; const messages = defineMessages({ startDate: { @@ -34,6 +35,24 @@ type Props = {| initialId: string, |}; +const IconWrapper = styled(Box)(({ theme }) => ({ + display: 'flex', + alignContent: 'center', + justifyContent: 'center', + alignItems: 'center', + '& svg': { + '& path': { + fill: theme.palette.ds.el_gray_max, + }, + }, +})); + +const OpenPickerIcon = () => ( + + + +); + @observer export default class ExportTransactionDialog extends Component { static contextTypes: {| intl: $npm$ReactIntl$IntlFormat |} = { @@ -79,15 +98,10 @@ export default class ExportTransactionDialog extends Component { }} className={componentId} renderInput={params => { - return ( - - ); + return ; + }} + components={{ + OpenPickerIcon, }} /> ))}