@dossierhq/design
Version:
The design system for Dossier.
9 lines • 923 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { toColorClassName } from '../../config/Colors.js';
import { toClassName } from '../../utils/ClassNameUtils.js';
import { toTextStyleClassName } from '../../utils/TextStylePropsUtils.js';
import { Icon } from '../Icon/Icon.js';
export function Input({ className, color, iconLeft, placeholder, type, readOnly, textStyle, min, max, step, value, onChange, onKeyDown, onClick, }) {
return (_jsxs("div", { className: toClassName('control', iconLeft && 'has-icons-left', className), children: [_jsx("input", { className: toClassName('input', toColorClassName(color), textStyle && toTextStyleClassName(textStyle), onClick && 'is-clickable'), type: type ?? 'text', min, max, step, placeholder, readOnly, value, onChange, onKeyDown, onClick }), iconLeft ? _jsx(Icon, { className: "is-left", icon: iconLeft }) : null] }));
}
//# sourceMappingURL=Input.js.map