UNPKG

@atlaskit/form

Version:

A form allows people to input information.

18 lines (17 loc) 556 B
import React from 'react'; import { FieldId } from './field-id-context'; import Message from './message'; /** * __Helper message__ * * A helper message tells the user what kind of input the field takes. For example, a helper message could be * 'Password should be more than 4 characters' * */ export const HelperMessage = ({ children, testId }) => /*#__PURE__*/React.createElement(FieldId.Consumer, null, fieldId => /*#__PURE__*/React.createElement(Message, { fieldId: fieldId ? `${fieldId}-helper` : undefined, testId: testId }, children));