UNPKG

@talend/react-forms

Version:

React forms library based on json schema form.

37 lines 914 B
import PropTypes from 'prop-types'; import { TextMode as FieldTemplate } from '../../FieldTemplate'; import { getFileName } from '../File.component'; import { jsx as _jsx } from "react/jsx-runtime"; export default function FileTextMode(props) { const { id, schema, value } = props; const { title, labelProps } = schema; return /*#__PURE__*/_jsx(FieldTemplate, { id: id, label: title, labelProps: labelProps, children: getFileName(value, schema) }); } if (process.env.NODE_ENV !== 'production') { FileTextMode.propTypes = { id: PropTypes.string, schema: PropTypes.shape({ title: PropTypes.string, labelProps: PropTypes.object, type: PropTypes.string }), value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) }; } FileTextMode.defaultProps = { schema: {}, value: '' }; //# sourceMappingURL=TextMode.component.js.map