Skip to content

Commit

Permalink
fix(list): show pointer cursor for button list items
Browse files Browse the repository at this point in the history
Fixes #5045

PiperOrigin-RevId: 570501994
  • Loading branch information
asyncLiz authored and copybara-github committed Oct 3, 2023
1 parent d6f7220 commit 16480d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 16480d0

Please sign in to comment.