UNPKG

@keycloakify/keycloak-account-ui

Version:

<p align="center"> <img src="https://github.com/user-attachments/assets/e31c4910-7205-441c-9a35-e134b806b3a8"> </p> <p align="center"> <i>Repackaged Keycloak Account UI</i> <br> <br> <a href="https://github.com/keycloakify/keycloak-a

14 lines 986 B
import { jsx as _jsx } from "react/jsx-runtime"; import { TextInput } from "@patternfly/react-core"; import { UserProfileGroup } from "../../ui-shared/user-profile/UserProfileGroup"; import { fieldName, isRequiredAttribute, label } from "../../ui-shared/user-profile/utils"; export const TextComponent = (props) => { var _a; const { form, inputType, attribute } = props; const isRequired = isRequiredAttribute(attribute); const type = inputType.startsWith("html") ? inputType.substring("html".length + 2) : "text"; return (_jsx(UserProfileGroup, Object.assign({}, props, { children: _jsx(TextInput, Object.assign({ id: attribute.name, "data-testid": attribute.name, type: type, placeholder: label(props.t, (_a = attribute.annotations) === null || _a === void 0 ? void 0 : _a["inputTypePlaceholder"]), readOnly: attribute.readOnly, isRequired: isRequired }, form.register(fieldName(attribute.name)))) }))); }; //# sourceMappingURL=TextComponent.js.map