UNPKG

@wordpress/block-library

Version:
22 lines (21 loc) • 663 B
import { __ } from "@wordpress/i18n"; import { ChainIcon } from "./icons/index.mjs"; // 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: ChainIcon, label: __("Social Icon") }; return { icon: variation?.icon ?? ChainIcon, label: variation?.title ?? __("Social Icon") }; } export { getSocialService }; //# sourceMappingURL=social-list.mjs.map