Fix missing icons and subtitle in mobile boost/quote menu (#36038)
This commit is contained in:
parent
65b4a0a6f1
commit
a5fbe2f5c1
11 changed files with 498 additions and 470 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import classNames from 'classnames';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { DropdownMenuItemContent } from 'mastodon/components/dropdown_menu';
|
||||
import type { MenuItem } from 'mastodon/models/dropdown_menu';
|
||||
import {
|
||||
isActionItem,
|
||||
|
|
@ -18,14 +19,14 @@ export const ActionsModal: React.FC<{
|
|||
return <li key={`sep-${i}`} className='dropdown-menu__separator' />;
|
||||
}
|
||||
|
||||
const { text, dangerous } = option;
|
||||
const { text, highlighted, disabled, dangerous } = option;
|
||||
|
||||
let element: React.ReactElement;
|
||||
|
||||
if (isActionItem(option)) {
|
||||
element = (
|
||||
<button onClick={onClick} data-index={i}>
|
||||
{text}
|
||||
<button onClick={onClick} data-index={i} disabled={disabled}>
|
||||
<DropdownMenuItemContent item={option} />
|
||||
</button>
|
||||
);
|
||||
} else if (isExternalLinkItem(option)) {
|
||||
|
|
@ -38,21 +39,22 @@ export const ActionsModal: React.FC<{
|
|||
onClick={onClick}
|
||||
data-index={i}
|
||||
>
|
||||
{text}
|
||||
<DropdownMenuItemContent item={option} />
|
||||
</a>
|
||||
);
|
||||
} else {
|
||||
element = (
|
||||
<Link to={option.to} onClick={onClick} data-index={i}>
|
||||
{text}
|
||||
<DropdownMenuItemContent item={option} />
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<li
|
||||
className={classNames({
|
||||
className={classNames('dropdown-menu__item', {
|
||||
'dropdown-menu__item--dangerous': dangerous,
|
||||
'dropdown-menu__item--highlighted': highlighted,
|
||||
})}
|
||||
key={`${text}-${i}`}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue