META-INF.resources.js.components.form.FormBase.js Maven / Gradle / Ivy
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
import ClayForm, {ClayInput} from '@clayui/form';
import ClayIcon from '@clayui/icon';
import classNames from 'classnames';
import React from 'react';
const ErrorFeedback = ({className, error}) => (
{error}
);
const HelpMessage = ({message}) => (
);
const Input = ({
className,
disabled,
error,
feedbackMessage,
id,
label,
name,
required,
type = 'text',
...restProps
}) => {
const inputId = id || name;
return (
{typeof error === 'string' && }
{feedbackMessage && (
{feedbackMessage}
)}
);
};
const RequiredMark = () => (
<>
{Liferay.Language.get('required')}
>
);
export {ErrorFeedback, Input, HelpMessage, RequiredMark};