UNPKG

@conductionnl/nl-design-system

Version:

NL design system components created by Conduction

27 lines (26 loc) 1.57 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextareaGroup = void 0; var jsx_runtime_1 = require("react/jsx-runtime"); var InfoTooltip_1 = require("../../InfoTooltip/InfoTooltip"); /** * This component generates a input element with the specified type. * * @returns Jsx of the generated form. */ var TextareaGroup = function (_a) { var id = _a.id, infoTooltip = _a.infoTooltip, defaultValue = _a.defaultValue, name = _a.name, label = _a.label, required = _a.required, disabled = _a.disabled; return ((0, jsx_runtime_1.jsxs)("div", __assign({ className: "form-group" }, { children: [(0, jsx_runtime_1.jsxs)("label", __assign({ htmlFor: id, className: "utrecht-form-label" }, { children: [label, required && " *", infoTooltip && (0, jsx_runtime_1.jsx)(InfoTooltip_1.InfoTooltip, { content: infoTooltip.content, placement: infoTooltip.placement }, void 0)] }), void 0), (0, jsx_runtime_1.jsx)("textarea", __assign({ maxLength: 500, className: "utrecht-textarea form-control" }, { id: id, defaultValue: defaultValue, name: name, required: required, disabled: disabled }), void 0)] }), void 0)); }; exports.TextareaGroup = TextareaGroup;