Change design of dropdowns in web UI (#25107)

This commit is contained in:
Eugen Rochko 2023-06-06 21:49:49 +02:00 committed by GitHub
parent ed04c277b4
commit e4fd9503ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 272 deletions

View file

@ -121,10 +121,10 @@ class DropdownMenu extends PureComponent {
return <li key={`sep-${i}`} className='dropdown-menu__separator' />;
}
const { text, href = '#', target = '_blank', method } = option;
const { text, href = '#', target = '_blank', method, dangerous } = option;
return (
<li className='dropdown-menu__item' key={`${text}-${i}`}>
<li className={classNames('dropdown-menu__item', { 'dropdown-menu__item--dangerous': dangerous })} key={`${text}-${i}`}>
<a href={href} target={target} data-method={method} rel='noopener noreferrer' role='button' tabIndex={0} ref={i === 0 ? this.setFocusRef : null} onClick={this.handleClick} onKeyPress={this.handleItemKeyPress} data-index={i}>
{text}
</a>