UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

42 lines (41 loc) 1.84 kB
import { TvmChains } from './types'; export const successColor = '#3e8c3e'; export const warningColor = '#fab254'; export const errorColor = '#d33131'; export function labelStyle(color = 'inherit') { return ` background-color: ${color}50; border-left: 3px solid ${color}; border-radius: 2px; display: inline; font-size: 1em; font-weight: bold; line-height: 1rem; padding: 3px 4px 0 4px`; } export function getScanLink(address, networkId) { if (networkId === TvmChains.VenomTestnet.toString()) { return `https://testnet.venomscan.com/accounts/${address}`; } if (networkId === TvmChains.VenomMainnet.toString()) { return `https://venomscan.com/accounts/${address}`; } if (networkId === TvmChains.HamsterMainnet.toString()) { return `https://hamsterscan.io/accounts/${address}`; } if (networkId === TvmChains.HumoMainnet.toString()) { return `https://humoscan.com/accounts/${address}`; } if (networkId === TvmChains.TychoTestnet.toString()) { return `https://testnet.tychoprotocol.com/accounts/${address}`; } return `https://everscan.io/accounts/${address}`; } export const baseLabelStyle = labelStyle('#767676'); export const successLabelStyle = labelStyle(successColor); export const warningLabelStyle = labelStyle(warningColor); export const errorLabelStyle = labelStyle(errorColor); export const successTextStyle = `color: ${successColor}; display: inline; font-weight: 400; font-family: monospace;`; export const warningTextStyle = `color: ${warningColor}; display: inline; font-weight: 400; font-family: monospace;`; export const errorTextStyle = `color: ${errorColor}; display: inline; font-weight: 400; font-family: monospace;`; export const inheritTextStyle = 'color: inherit; display: inline; font-weight: 400; font-family: monospace;';