web.lib.core.components.extended-text-input.tsx Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of code-quarkus Show documentation
Show all versions of code-quarkus Show documentation
Customize a Web Interface to generate Quarkus starter projects.
import React, { useState } from 'react';
import { useAnalyticsEditionField } from '../../core/analytics'
import { DebouncedTextInput, DebouncedTextInputProps } from './debounced-text-input';
import { FaExclamationTriangle } from 'react-icons/fa';
import classNames from 'classnames';
export interface ExtendedTextInputProps extends DebouncedTextInputProps {
id: string;
label: string;
}
export function ExtendedTextInput(props: ExtendedTextInputProps) {
const { value, onChange, isValid, label, className, ...rest } = props;
const [ isDirty, onChangeWithDirty ] = useAnalyticsEditionField(props.id, onChange);
const valid = (!isDirty && !props.value) || isValid;
return (
{!isValid && }
);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy