Skip to content

Commit 811c88f

Browse files
committed
Description should be inactive color if a collection doesn't have one
1 parent 0660031 commit 811c88f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

client/modules/IDE/components/EditableInput.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ function EditableInput({
1414
const [isEditing, setIsEditing] = React.useState(false);
1515
const [currentValue, setCurrentValue] = React.useState(value || '');
1616
const displayValue = currentValue || emptyPlaceholder;
17-
const classes = `editable-input editable-input--${isEditing ? 'is-editing' : 'is-not-editing'}`;
17+
const hasValue = currentValue !== '';
18+
const classes = `editable-input editable-input--${isEditing ? 'is-editing' : 'is-not-editing'} editable-input--${hasValue ? 'has-value' : 'has-placeholder'}`;
1819
const inputRef = React.createRef();
1920

2021
React.useEffect(() => {

client/styles/components/_collection.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767

6868
.collection-metadata__description .editable-input__label {
6969
text-align: left;
70+
}
7071

72+
.collection-metadata__description .editable-input--has-value .editable-input__label {
7173
@include themify() {
7274
color: getThemifyVariable('primary-text-color');
7375
}

0 commit comments

Comments
 (0)