Skip to content
Prev Previous commit
Next Next commit
Extend the ListItem component to configure explicitly is item clickab…
…le or not
  • Loading branch information
bogiii committed Jan 18, 2023
commit e7772e7c57a4bbd750e949b2d4219c7964d395a8
8 changes: 7 additions & 1 deletion client/my-sites/people/people-list-item/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ class PeopleListItem extends PureComponent {
site: PropTypes.object,
invite: PropTypes.object,
showStatus: PropTypes.bool,
clickableItem: PropTypes.bool,
RevokeClearBtn: PropTypes.elementType,
};

static defaultProps = {
clickableItem: true,
RevokeClearBtn: null,
};

Expand Down Expand Up @@ -60,7 +62,11 @@ class PeopleListItem extends PureComponent {
};

maybeGetCardLink = () => {
const { invite, site, type, user } = this.props;
const { invite, site, type, user, clickableItem } = this.props;

if ( ! clickableItem ) {
return false;
}

switch ( type ) {
case 'invite-details':
Expand Down