renames singularName to singularLabel within repeater

This commit is contained in:
James
2020-03-30 17:24:53 -04:00
parent 3788d21b9c
commit 75c3d9697c
2 changed files with 8 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ const DraggableSection = (props) => {
defaultValue,
dispatchCollapsibleStates,
collapsibleStates,
singularName,
singularLabel,
} = props;
const handleCollapseClick = () => {
@@ -52,7 +52,7 @@ const DraggableSection = (props) => {
/>
<div className={`${baseClass}__header__row-index`}>
{`${singularName} ${rowIndex + 1}`}
{`${singularLabel} ${rowIndex + 1}`}
</div>
<div className={`${baseClass}__header__controls`}>
@@ -99,7 +99,7 @@ DraggableSection.defaultProps = {
rowCount: null,
defaultValue: null,
collapsibleStates: [],
singularName: '',
singularLabel: '',
};
DraggableSection.propTypes = {
@@ -107,7 +107,7 @@ DraggableSection.propTypes = {
removeRow: PropTypes.func.isRequired,
rowIndex: PropTypes.number.isRequired,
parentName: PropTypes.string.isRequired,
singularName: PropTypes.string,
singularLabel: PropTypes.string,
renderFields: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
rowCount: PropTypes.number,
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.shape({})]),

View File

@@ -25,7 +25,7 @@ const Repeater = (props) => {
name,
fields,
defaultValue,
singularName,
singularLabel,
} = props;
const addRow = (rowIndex) => {
@@ -104,7 +104,7 @@ const Repeater = (props) => {
<DraggableSection
key={rowIndex}
parentName={name}
singularName={singularName}
singularLabel={singularLabel}
addRow={() => addRow(rowIndex)}
removeRow={() => removeRow(rowIndex)}
rowIndex={rowIndex}
@@ -131,7 +131,7 @@ const Repeater = (props) => {
Repeater.defaultProps = {
label: '',
singularName: '',
singularLabel: '',
defaultValue: [],
};
@@ -143,7 +143,7 @@ Repeater.propTypes = {
PropTypes.shape({}),
).isRequired,
label: PropTypes.string,
singularName: PropTypes.string,
singularLabel: PropTypes.string,
name: PropTypes.string.isRequired,
};