adds context to new list item button
This commit is contained in:
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
.addButtonText {
|
.addButtonText {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
|
text-transform: lowercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.removeButton {
|
.removeButton {
|
||||||
|
@ -171,11 +171,13 @@ export default class ListControl extends Component {
|
|||||||
|
|
||||||
renderListControl() {
|
renderListControl() {
|
||||||
const { value, forID } = this.props;
|
const { value, forID } = this.props;
|
||||||
|
const listLabel = this.props.field._root.entries[0][1];
|
||||||
|
|
||||||
return (<div id={forID}>
|
return (<div id={forID}>
|
||||||
{value && value.map((item, index) => this.renderItem(item, index))}
|
{value && value.map((item, index) => this.renderItem(item, index))}
|
||||||
<button className={styles.addButton} onClick={this.handleAdd}>
|
<button className={styles.addButton} onClick={this.handleAdd}>
|
||||||
<FontIcon value="add" className={styles.addButtonIcon} />
|
<FontIcon value="add" className={styles.addButtonIcon} />
|
||||||
<span className={styles.addButtonText}>new</span>
|
<span className={styles.addButtonText}>new {listLabel}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user