UNPKG

@cimpress/react-components

Version:
11 lines 542 B
import React, { useState } from 'react'; import { TextField } from '@cimpress/react-components'; const TextFieldExamplePattern = () => { const [text, setText] = useState(''); const onInputChange = e => { setText(e.target.value); }; return (React.createElement(TextField, { name: "pattern", label: "Pattern Text Field where only A is accepted", value: text, onChange: e => e.isValid && onInputChange(e), pattern: "[A]*" })); }; export default TextFieldExamplePattern; //# sourceMappingURL=textFieldExamplePattern.js.map