Skip to content

Commit

Permalink
feat(item,comment): disabled variants
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lubber-de authored Apr 17, 2023
1 parent 446d89e commit d5f0e18
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/definitions/views/comment.less
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@
}
}
}
& when (@variationCommentDisabled) {
.ui.disabled.comments,
.ui.comments .disabled.comment {
opacity: @disabledOpacity;
pointer-events: @disabledPointerEvents;
}
}

// stylelint-disable no-invalid-position-at-import-rule
@import (multiple, optional) "../../overrides.less";
7 changes: 7 additions & 0 deletions src/definitions/views/item.less
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,13 @@
}
}
}
& when (@variationItemDisabled) {
.ui.disabled.items,
.ui.items > .disabled.item {
opacity: @disabledOpacity;
pointer-events: @disabledPointerEvents;
}
}

// stylelint-disable no-invalid-position-at-import-rule
@import (multiple, optional) "../../overrides.less";
2 changes: 2 additions & 0 deletions src/themes/default/globals/variation.variables
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@

/* Comment */
@variationCommentInverted: true;
@variationCommentDisabled: true;
@variationCommentThreaded: true;
@variationCommentMinimal: true;
@variationCommentAvatar: true;
Expand All @@ -461,6 +462,7 @@

/* Item */
@variationItemInverted: true;
@variationItemDisabled: true;
@variationItemImage: true;
@variationItemHeader: true;
@variationItemDescription: true;
Expand Down

0 comments on commit d5f0e18

Please sign in to comment.