UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

51 lines 2.42 kB
"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.RadioButtonReplacement = RadioButtonReplacement; const react_1 = __importDefault(require("react")); const RadioButton_1 = __importDefault(require("../../components/RadioButton/RadioButton")); /** @deprecated (v25) all legacy component support will be removed, switch to `<RadioButton />` */ function RadioButtonReplacement(_a) { var { children, label } = _a, otherProps = __rest(_a, ["children", "label"]); if (process.env.NODE_ENV === "development") { const debugMsg = [ "This radio element is a adhoc replacement for a legacy element. Usage is deprecated, please use a standard element (RadioButton).", ]; if (typeof otherProps.ripple !== "undefined") { debugMsg.push("Radio 'ripple' property is not supported on legacy replacement element."); delete otherProps.ripple; } if (typeof otherProps.hideLabel !== "undefined") { debugMsg.push("Radio 'hideLabel' property is not supported on legacy replacement element."); delete otherProps.hideLabel; } if (typeof label !== "undefined") { debugMsg.push("Radio 'label' property is not supported exactly like at the legacy element."); } // eslint-disable-next-line no-console debugMsg.forEach((element) => console.debug(element)); } if (typeof otherProps.ripple !== "undefined") { delete otherProps.ripple; } if (typeof otherProps.hideLabel !== "undefined") { delete otherProps.hideLabel; } return (react_1.default.createElement(RadioButton_1.default, Object.assign({}, otherProps), label, children)); } //# sourceMappingURL=RadioButton.js.map