@coin-voyage/paykit
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
12 lines (11 loc) • 655 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getChainLogo } from "@coin-voyage/shared/chain";
import { cloneElement } from "react";
import { ChainContainer, TokenChainContainer } from "./styles";
export default function TokenChainLogo({ chainId, chainStyle, style, ...props }) {
const chainLogo = getChainLogo(chainId);
return (_jsxs(TokenChainContainer, { children: [_jsx("img", { ...props, style: {
...style,
borderRadius: style?.borderRadius ?? "22.5%",
} }), _jsx(ChainContainer, { style: chainStyle, children: chainLogo && cloneElement(chainLogo) })] }));
}