UNPKG

@adaptabletools/adaptable-cjs

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

24 lines (23 loc) 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.baseClassName = void 0; const tslib_1 = require("tslib"); const React = tslib_1.__importStar(require("react")); const Flex_1 = require("../Flex"); const clsx_1 = tslib_1.__importDefault(require("clsx")); exports.baseClassName = 'ab-Input'; const Input = React.forwardRef((props, ref) => { const { disabled, className, ...inputProps } = props; let type = 'text'; if (inputProps && inputProps.type) { type = inputProps.type; } if (type === 'string') { type = 'text'; } return (React.createElement(Flex_1.Box, { as: "input", ref: ref, ...inputProps, type: type, disabled: disabled, className: (0, clsx_1.default)(className, exports.baseClassName, 'twa:min-h-input', type ? `${exports.baseClassName}--type-${type}` : '', disabled ? `${exports.baseClassName}--disabled` : '', { 'twa:bg-(--ab-cmp-input__background)': !disabled, 'twa:bg-(--ab-cmp-input--disabled__background)': disabled, }) })); }); exports.default = Input;