import React, { Fragment } from 'react'; import { BaseDataEntryProps } from './data-entry'; import { DataTitleCopyable } from './data-title'; interface PatternDataEntryProps extends BaseDataEntryProps { value?: string; placeholder?: string; /** * This is not a JS RegExp, so there's no validation in code, because we're passing it to HTML input as a string */ pattern: string; maxLength?: number; } export const PatternDataEntry: React.FC = props => { const handleChange = (value: string) => { props.onChange?.(props.slug, value); }; return ( <> handleChange(e.target.value)} /> ); }