All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.lib.core.components.extended-text-input.tsx Maven / Gradle / Ivy

There is a newer version: 37
Show newest version
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