Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(collapse): modify the disabled style #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/banana/src/collapse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ export default class BCollapse extends LitElement {
class=${classMap({
collapse: true,
'collapse--open': !this.disabled && this.open,
'collapse--disabled': this.disabled,
})}
>
<div
part="header"
class="collapse__header"
class=${classMap({
collapse__header: true,
'collapse--disabled': this.disabled,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名为collapse--disabled的class不应放在header上,详见comment。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

了解了。
如果要实现 2 的效果这里父节点的cursor不会覆盖子节点的cursor,可能需要考虑更改一下position。

})}
@click="${this._onHeaderClick}"
@keydown="${this._onHeaderKeyDown}"
role="button"
Expand Down