UNPKG

@ledgerhq/live-common

Version:
40 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getValidCryptoIconSize = exports.getValidCryptoIconSizeNative = void 0; // Utility to map any size to valid crypto-icons sizes // For React Native (returns numbers) const getValidCryptoIconSizeNative = (size) => { if (size <= 16) return 16; if (size <= 20) return 20; if (size <= 24) return 24; if (size <= 32) return 32; if (size <= 40) return 40; if (size <= 48) return 48; return 56; }; exports.getValidCryptoIconSizeNative = getValidCryptoIconSizeNative; // Utility to map any size to valid crypto-icons sizes // For React/Web (returns strings with "px") const getValidCryptoIconSize = (size) => { if (size <= 16) return "16px"; if (size <= 20) return "20px"; if (size <= 24) return "24px"; if (size <= 32) return "32px"; if (size <= 40) return "40px"; if (size <= 48) return "48px"; return "56px"; }; exports.getValidCryptoIconSize = getValidCryptoIconSize; //# sourceMappingURL=cryptoIconSize.js.map