Skip to content

Commit

Permalink
Fix token logo form (#372)
Browse files Browse the repository at this point in the history
* Remove error on empty url

* Add defensive css for token logos

* Add fix for pngs
  • Loading branch information
abefernan authored Feb 21, 2022
1 parent c8062b6 commit 04f0e9d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export const TokenLogoName = styled.div`
flex-grow: 1;
& img {
width: 100%;
height: 100%;
max-width: 30px;
max-height: 30px;
}
Expand Down
1 change: 1 addition & 0 deletions src/App/components/FieldsTokenLogo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default function FieldsTokenLogo({
optional
value={previewLogoUrl}
onInputChange={({ target }) => {
if (target.value === "") setLogoError(undefined);
setPreviewLogoUrl(target.value);
setLogoUrl(target.value);
}}
Expand Down
5 changes: 4 additions & 1 deletion src/App/components/FieldsTokenLogo/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export const StyledFieldsTokenLogo = styled.div`
img[alt="Token logo"] {
margin-top: var(--s2);
height: 52px;
width: 100%;
height: 100%;
max-width: 52px;
max-height: 52px;
}
img[alt="Remove logo"] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export const ContainerLogoNames = styled.div`
flex-shrink: 0;
& img {
height: 32px;
width: 100%;
height: 100%;
max-width: 32px;
max-height: 32px;
}
`;

Expand Down

0 comments on commit 04f0e9d

Please sign in to comment.