Skip to content

Commit e0969ef

Browse files
committed
wip: properties panel close when notification is open
1 parent e6d4c94 commit e0969ef

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

packages/webui/src/client/ui/RundownView/RundownRightHandControls.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import { MediaStatusPopUp } from './MediaStatusPopUp'
2626
import { MediaStatusIcon } from '../../lib/ui/icons/mediaStatus'
2727
import { SelectedElementsContext } from './SelectedElementsContext'
2828
import { UserEditsCloseIcon, UserEditsIcon } from '../../lib/ui/icons/useredits'
29-
import { CollapseChevrons } from '../../lib/ui/icons/notifications'
3029

3130
interface IProps {
3231
playlistId: RundownPlaylistId
@@ -157,16 +156,19 @@ export function RundownRightHandControls(props: Readonly<IProps>): JSX.Element {
157156
title={t('Notes')}
158157
/>
159158
<SelectedElementsContext.Consumer>
160-
{(context) => (
161-
<button
162-
onClick={() => context.clearSelections()}
163-
className={classNames('status-bar__controls__button', {
164-
'status-bar__controls__button--open': context.listSelectedElements().length > 0,
165-
})}
166-
>
167-
{context.listSelectedElements().length === 0 ? <UserEditsIcon /> : <UserEditsCloseIcon />}
168-
</button>
169-
)}
159+
{(context) => {
160+
const isOpen = context.listSelectedElements().length > 0 && !props.isNotificationCenterOpen
161+
return (
162+
<button
163+
onClick={() => context.clearSelections()}
164+
className={classNames('status-bar__controls__button', {
165+
'status-bar__controls__button--open': isOpen,
166+
})}
167+
>
168+
{isOpen ? <UserEditsIcon /> : <UserEditsCloseIcon />}
169+
</button>
170+
)
171+
}}
170172
</SelectedElementsContext.Consumer>
171173
<button
172174
className="status-bar__controls__button"

0 commit comments

Comments
 (0)