1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

12.0 add buttons animation (#6167)

* add library container animation

* change animation and style
This commit is contained in:
Michael An
2024-06-17 14:48:16 +08:00
committed by GitHub
parent 5db1bd93ac
commit 422108b312
6 changed files with 126 additions and 40 deletions

View File

@@ -4,6 +4,7 @@ import listener from '../context-menu/globalEventListener';
import { Dropdown, DropdownMenu, DropdownToggle, DropdownItem } from 'reactstrap';
import { gettext } from '../../utils/constants';
import { Utils } from '../../utils/utils';
import ModalPortal from '../modal-portal';
const propTypes = {
tagName: PropTypes.string,
@@ -158,17 +159,19 @@ class ItemDropdownMenu extends React.Component {
onKeyDown={this.onDropdownToggleKeyDown}
// onClick={this.onDropdownToggleClick}
/>
<DropdownMenu>
{menuList.map((menuItem, index) => {
if (menuItem === 'Divider') {
return <DropdownItem key={index} divider />;
} else {
return (
<DropdownItem key={index} data-toggle={menuItem.key} onClick={this.onMenuItemClick} onKeyDown={this.onMenuItemKeyDown}>{menuItem.value}</DropdownItem>
);
}
})}
</DropdownMenu>
<ModalPortal>
<DropdownMenu>
{menuList.map((menuItem, index) => {
if (menuItem === 'Divider') {
return <DropdownItem key={index} divider />;
} else {
return (
<DropdownItem key={index} data-toggle={menuItem.key} onClick={this.onMenuItemClick} onKeyDown={this.onMenuItemKeyDown}>{menuItem.value}</DropdownItem>
);
}
})}
</DropdownMenu>
</ModalPortal>
</Dropdown>
);
}