UNPKG

@0xsequence/connect

Version:
18 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NetworkBadge = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const design_system_1 = require("@0xsequence/design-system"); const networks_js_1 = require("../../utils/networks.js"); const NetworkBadge = ({ chainId }) => { const network = (0, networks_js_1.getNetwork)(chainId); const chainColor = (0, networks_js_1.getNetworkColor)(chainId); const chainBGColor = (0, networks_js_1.getNetworkBackgroundColor)(chainId); return ((0, jsx_runtime_1.jsxs)("div", { className: "flex h-6 px-2 gap-1 rounded-sm flex-row justify-center items-center w-fit", style: { background: chainBGColor }, children: [(0, jsx_runtime_1.jsx)(design_system_1.NetworkImage, { chainId: chainId, size: "xs" }), (0, jsx_runtime_1.jsx)(design_system_1.Text, { variant: "xsmall", fontWeight: "bold", style: { color: chainColor }, capitalize: true, ellipsis: true, children: network.title ?? network.name })] })); }; exports.NetworkBadge = NetworkBadge; //# sourceMappingURL=NetworkBadge.js.map