Skip to content

Commit d5f0e18

Browse files
authored
feat(item,comment): disabled variants
Added a disabled variant to comment and item because such elements could contain interactive elements and it's quite a common use case to have all/single comment(s)/item(s) being disabled
1 parent 446d89e commit d5f0e18

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/definitions/views/comment.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,13 @@
290290
}
291291
}
292292
}
293+
& when (@variationCommentDisabled) {
294+
.ui.disabled.comments,
295+
.ui.comments .disabled.comment {
296+
opacity: @disabledOpacity;
297+
pointer-events: @disabledPointerEvents;
298+
}
299+
}
293300

294301
// stylelint-disable no-invalid-position-at-import-rule
295302
@import (multiple, optional) "../../overrides.less";

src/definitions/views/item.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,13 @@
597597
}
598598
}
599599
}
600+
& when (@variationItemDisabled) {
601+
.ui.disabled.items,
602+
.ui.items > .disabled.item {
603+
opacity: @disabledOpacity;
604+
pointer-events: @disabledPointerEvents;
605+
}
606+
}
600607

601608
// stylelint-disable no-invalid-position-at-import-rule
602609
@import (multiple, optional) "../../overrides.less";

src/themes/default/globals/variation.variables

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@
439439

440440
/* Comment */
441441
@variationCommentInverted: true;
442+
@variationCommentDisabled: true;
442443
@variationCommentThreaded: true;
443444
@variationCommentMinimal: true;
444445
@variationCommentAvatar: true;
@@ -461,6 +462,7 @@
461462

462463
/* Item */
463464
@variationItemInverted: true;
465+
@variationItemDisabled: true;
464466
@variationItemImage: true;
465467
@variationItemHeader: true;
466468
@variationItemDescription: true;

0 commit comments

Comments
 (0)