Skip to content

Commit

Permalink
Merge branch 'main' into fix-multiple-tooltop-layer
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGenius authored Oct 24, 2023
2 parents 686a7bf + b498557 commit 150a64e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.1.2](https://github.com/gravity-ui/navigation/compare/v1.1.1...v1.1.2) (2023-10-17)


### Bug Fixes

* **CompositeBar:** recalc mounted PopupPosition if compact mode changed ([#138](https://github.com/gravity-ui/navigation/issues/138)) ([56ac451](https://github.com/gravity-ui/navigation/commit/56ac451bebb55a8d8163fb9ccd38acb236f1eb99))

## [1.1.1](https://github.com/gravity-ui/navigation/compare/v1.1.0...v1.1.1) (2023-10-13)


Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gravity-ui/navigation",
"version": "1.1.1",
"version": "1.1.2",
"description": "Gravity UI Navigation components",
"license": "MIT",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export const AsideHeaderShowcase: FC<AsideHeaderShowcaseProps> = ({
popupPlacement={['right-end']}
popupOffset={[-20, 10]}
onClosePopup={() => setPopupVisible(false)}
popupKeepMounted={true}
renderPopupContent={() => {
return (
<div className={b('settings')}>
Expand Down
14 changes: 14 additions & 0 deletions src/components/CompositeBar/Item/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ export const Item: React.FC<ItemInnerProps> = (props) => {
const iconSize = item.iconSize || ASIDE_HEADER_ICON_SIZE;
const collapsedItem = item.id === COLLAPSE_ITEM_ID;

const modifiers: Required<PopupProps>['modifiers'] = React.useMemo(
() => [
{
name: 'compact',
enabled: true,
options: {compact},
phase: 'main',
fn() {},
},
],
[compact],
);

const onClose = React.useCallback(
(event: MouseEvent | KeyboardEvent) => {
if (
Expand Down Expand Up @@ -191,6 +204,7 @@ export const Item: React.FC<ItemInnerProps> = (props) => {
offset={popupOffset}
anchorRef={anchorRef}
onClose={onClose}
modifiers={modifiers}
>
{renderPopupContent()}
</Popup>
Expand Down

0 comments on commit 150a64e

Please sign in to comment.