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(list): show pointer cursor for button list items #5051

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions list/internal/listitem/_list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
);
}

:host(:is([type='button']:not([disabled]), [type='link'])) {
cursor: pointer;
}

md-focus-ring {
z-index: 1;

Expand All @@ -64,6 +68,7 @@
// Resets. These can be removed once we're no longer use these tags
background: none;
border: none;
cursor: inherit;
padding: 0;
margin: 0;
text-align: unset;
Expand Down
2 changes: 1 addition & 1 deletion list/internal/listitem/list-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ListItemEl extends LitElement implements ListItem {
* Sets the behavior of the list item, defaults to "text". Change to "link" or
* "button" for interactive items.
*/
@property() type: ListItemType = 'text';
@property({reflect: true}) type: ListItemType = 'text';

/**
* READONLY. Sets the `md-list-item` attribute on the element.
Expand Down