UNPKG

@teamsnap/teamsnap-ui

Version:

a CSS component library for TeamSnap

38 lines (37 loc) 1.29 kB
/** * @name FieldWrapper * * @description * A FieldWrapper component is a helper component to group common field components together such as inputs, labels, * and messages. If you need a more custom setup, look at creating your own 'FieldGroup' See the teamsnap patterns * library for more information. https://teamsnap-ui-patterns.netlify.com/patterns/components/field-group.html * * @example * <FieldWrapper * name='example' * label='Test Input' * field='input' * fieldProps={{ placeholder: 'Some placehodler text' }} /> * */ import * as React from "react"; import * as PropTypes from "prop-types"; declare class FieldWrapper extends React.PureComponent<PropTypes.InferProps<typeof FieldWrapper.propTypes>, any> { static propTypes: { name: PropTypes.Validator<string>; field: PropTypes.Validator<string>; fieldProps: PropTypes.Requireable<any>; status: PropTypes.Requireable<string>; label: PropTypes.Requireable<PropTypes.ReactNodeLike>; message: PropTypes.Requireable<string>; }; static defaultProps: { fieldProps: {}; status: any; label: any; message: any; }; renderFieldComponent: () => any; render(): JSX.Element; } export default FieldWrapper;