Skip to content

Commit

Permalink
Fix nesting of Tools in Addon Panel
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Jan 30, 2023
1 parent dd4904d commit 943bd6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions code/ui/components/src/tabs/tabs.hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export function useList(list: ChildrenList) {
active={isAddonsActive}
preActive={isTooltipVisible}
style={{ visibility: invisibleList.length ? 'visible' : 'hidden' }}
aria-hidden={!invisibleList.length}
className="tabbutton"
type="button"
role="tab"
Expand All @@ -103,6 +104,7 @@ export function useList(list: ChildrenList) {
<TabButton
id={`tabbutton-${sanitize(title)}`}
style={{ visibility: 'hidden' }}
aria-hidden
tabIndex={-1}
ref={(ref: HTMLButtonElement) => {
tabRefs.current.set(id, ref);
Expand Down
2 changes: 1 addition & 1 deletion code/ui/components/src/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const Tabs: FC<TabsProps> = memo(
})}
<AddonTab menuName={menuName} actions={actions} />
</TabBar>
{tools ? <Side right>{tools}</Side> : null}
{tools}
</FlexBar>
<Content id="panel-tab-content" bordered={bordered} absolute={absolute}>
{list.map(({ id, active, render }) => render({ key: id, active }))}
Expand Down

0 comments on commit 943bd6d

Please sign in to comment.