UNPKG

@wordpress/block-library

Version:
27 lines (26 loc) • 899 B
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let _wordpress_i18n = require("@wordpress/i18n"); let __icons_index_js = require("./icons/index.cjs"); // packages/block-library/src/social-link/social-list.js /** * Retrieves the social service's icon component and label. * * @param {Object} variation The object of the social service variation. * @return {Object} An object containing the Icon component for social service and label. */ function getSocialService(variation) { if (!variation?.name) return { icon: __icons_index_js.ChainIcon, label: (0, _wordpress_i18n.__)("Social Icon") }; return { icon: variation?.icon ?? __icons_index_js.ChainIcon, label: variation?.title ?? (0, _wordpress_i18n.__)("Social Icon") }; } exports.getSocialService = getSocialService; //# sourceMappingURL=social-list.cjs.map