@keycloakify/keycloak-account-ui
Version:
Repackaged Keycloak Account UI
11 lines • 974 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { KeycloakTextArea } from "../../ui-shared/controls/keycloak-text-area/KeycloakTextArea";
import { UserProfileGroup } from "../../ui-shared/user-profile/UserProfileGroup";
import { fieldName, isRequiredAttribute } from "../../ui-shared/user-profile/utils";
export const TextAreaComponent = (props) => {
var _a, _b;
const { form, attribute } = props;
const isRequired = isRequiredAttribute(attribute);
return (_jsx(UserProfileGroup, Object.assign({}, props, { children: _jsx(KeycloakTextArea, Object.assign({ id: attribute.name, "data-testid": attribute.name }, form.register(fieldName(attribute.name)), { cols: (_a = attribute.annotations) === null || _a === void 0 ? void 0 : _a["inputTypeCols"], rows: (_b = attribute.annotations) === null || _b === void 0 ? void 0 : _b["inputTypeRows"], readOnly: attribute.readOnly, isRequired: isRequired })) })));
};
//# sourceMappingURL=TextAreaComponent.js.map