@@ -23,6 +23,7 @@ type Props = {
2323 /**
2424 * Optionally pass an array of fields that should be editable
2525 *
26+ * ```
2627 * [
2728 * {
2829 * path: ['username'],
@@ -33,6 +34,7 @@ type Props = {
3334 * required: true,
3435 * }
3536 * ]
37+ * ```
3638 */
3739 editFields ?: Array < FieldConfig >
3840 /**
@@ -43,6 +45,7 @@ type Props = {
4345 /**
4446 * Labels to show in the list
4547 *
48+ * ```
4649 * [
4750 * {
4851 * label: 'Username',
@@ -53,15 +56,16 @@ type Props = {
5356 * path: ['password']
5457 * },
5558 * ]
59+ * ```
5660 */
5761 labels : Labels
5862 /**
5963 * Callback when any field in the form is modified.
60- * If this property is set, the form becomes a controlled component and the value
61- * prop must be maintained externally.
64+ * If this property is set, the form becomes a controlled component
65+ * and the value prop must be maintained externally.
6266 *
63- * This is useful if you nest multiple FormHelpers or need to restrict user input
64- * before it appear on the screen.
67+ * This is useful if you nest multiple FormHelpers or need to
68+ * restrict user input before it appear on the screen.
6569 */
6670 onChange : ( updatedList ) => void
6771 /**
@@ -70,7 +74,8 @@ type Props = {
7074 edit : any
7175 setEdit : Function
7276 /**
73- * Set to true to only show error messages for fields that have been touched
77+ * Set to true to only show error messages for fields that
78+ * have been touched
7479 */
7580 errorOnTouched ?: boolean
7681 /**
@@ -112,6 +117,8 @@ const enhance = compose(
112117/**
113118 * Component for displaying a list of items, which handles editing and removal.
114119 *
120+ * ##### Example
121+ * ```
115122 * const enhance = compose(
116123 * withState('user', 'setUser', [{username: 'test', password: 'test'}]),
117124 * withState('editUser', 'setEditUser', null),
@@ -144,6 +151,7 @@ const enhance = compose(
144151 * edit={editUser}
145152 * setEdit={setEditUser}
146153 * />
154+ * ```
147155 */
148156export const EditList = enhance ( ( {
149157 value : list , onChange, labels, editFields, mapFields, edit, setEdit,
0 commit comments