Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: clear address input #1768

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ui/component/ChainSelector/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const ChainSelectorModal = ({
visible={visible}
onClose={handleCancel}
className={clsx(
'custom-popup',
'chain-selector__modal',
connection && 'connection',
className
Expand Down
3 changes: 2 additions & 1 deletion src/ui/views/AddressManagement/SortInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ReactComponent as IconSortByUsd } from '@/ui/assets/address/sort-by-usd
import { ReactComponent as IconSortByType } from '@/ui/assets/address/sort-by-type.svg';
import { ReactComponent as IconSortByAlphabet } from '@/ui/assets/address/sort-by-alphabet.svg';
import { AddressSortStore } from '@/background/service/preference';
import clsx from 'clsx';

export const AddressSortIconMapping: Record<
AddressSortStore['sortType'],
Expand Down Expand Up @@ -40,7 +41,7 @@ export const SortInput = ({

return (
<>
<div className="sort-input">
<div className={clsx('sort-input', value && 'searching')}>
<div className="sort" onClick={turnOn}>
{/* <img className="w-16 h-16" src={AddressSortIconMapping[sortType]} /> */}
{SortIcon}
Expand Down
7 changes: 7 additions & 0 deletions src/ui/views/AddressManagement/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,13 @@
transition: width 0.3s;
padding-right: 4px;

&.searching {
width: 220px;
.search-input .ant-input-suffix {
opacity: 1;
}
}

&:has(> .search-input:hover),
&:has(> .search-input.ant-input-affix-wrapper-focused) {
width: 220px;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/views/Dashboard/components/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ const Settings = (props: SettingsProps) => {
<Popup
visible={visible}
onClose={onClose}
height={523}
height={488}
bodyStyle={{ height: '100%', padding: '20px 20px 0 20px' }}
destroyOnClose
>
Expand Down
Loading