UNPKG

@keycloakify/keycloak-admin-ui

Version:
11 lines 739 B
import { jsx as _jsx } from "react/jsx-runtime"; import { useTranslation } from "react-i18next"; import { PasswordControl } from "../../ui-shared"; import { convertToName } from "../../components/dynamic/DynamicComponents"; export const PasswordComponent = ({ name, label, helpText, defaultValue, required, isDisabled = false, }) => { const { t } = useTranslation(); return (_jsx(PasswordControl, { name: convertToName(name), label: t(label), labelIcon: t(helpText), isDisabled: isDisabled, defaultValue: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString(), rules: { required: { value: !!required, message: t("required") }, } })); }; //# sourceMappingURL=PasswordComponent.js.map