Files
explore/ui/tokenInfo/TokenInfoIconPreview.tsx
tom goriunovandGitHub 0cd9033f20 Public tags form improvements (#2796)
* adjust validation of comment field

* add icon url to public tag form

* update screenshots

* fix ts
2025-06-23 19:25:41 +02:00

27 lines
596 B
TypeScript

import { Center } from '@chakra-ui/react';
import React from 'react';
interface Props {
url: string | undefined;
isInvalid: boolean;
children: React.ReactElement;
}
const TokenInfoIconPreview = ({ url, isInvalid, children }: Props) => {
const borderColorActive = isInvalid ? 'error' : 'input.border.filled';
return (
<Center
boxSize="60px"
flexShrink={ 0 }
borderWidth="2px"
borderColor={ url ? borderColorActive : 'input.border' }
borderRadius="base"
>
{ children }
</Center>
);
};
export default React.memo(TokenInfoIconPreview);