mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* adjust validation of comment field * add icon url to public tag form * update screenshots * fix ts
27 lines
596 B
TypeScript
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);
|