UNPKG

@enum-plus/plugin-react

Version:

A plugin for enum-plus that provides React components and hooks for enum handling

42 lines 1.94 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.reactI18nextPlugin = exports.i18nextPlugin = void 0; const i18next_1 = __importDefault(require("./localize/i18next")); const react_i18next_1 = __importDefault(require("./localize/react-i18next")); __exportStar(require("./localize/i18next"), exports); __exportStar(require("./localize/react-i18next"), exports); /** * - **EN:** A plugin for `i18next` to provide internationalization support for enums. * - **CN:** 适用于`i18next`的插件,用于提供枚举的国际化支持 */ const i18nextPlugin = (options, Enum) => { (0, i18next_1.default)(options, Enum); }; exports.i18nextPlugin = i18nextPlugin; /** * - **EN:** A plugin for `react-i18next` to provide internationalization support for enums in React * projects. * - **CN:** 适用于`react-i18next`的插件,用于在React项目中提供枚举的国际化支持 */ const reactI18nextPlugin = (options, Enum) => { (0, react_i18next_1.default)(options, Enum); }; exports.reactI18nextPlugin = reactI18nextPlugin; //# sourceMappingURL=../../src/index.js.map