Skip to content

Commit 74e4fdb

Browse files
committed
top navbar button fix -- the negative margin actually hid the border
1 parent 4b56c97 commit 74e4fdb

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/packages/frontend/components/sortable-tabs.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ export function renderTabBar(tabBarProps, DefaultTabBar, styles?) {
156156
return (
157157
<DefaultTabBar {...tabBarProps}>
158158
{(node) => (
159-
<SortableTab key={node.key} id={node.key} style={styles?.[node.key]}>
159+
<SortableTab
160+
key={node.key}
161+
id={node.key}
162+
style={styles?.[node.key] ?? styles?.[""]}
163+
>
160164
{node}
161165
</SortableTab>
162166
)}

src/packages/frontend/projects/projects-nav.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import type { TabsProps } from "antd";
77
import { Avatar, Popover, Tabs, Tooltip } from "antd";
8-
98
import {
109
redux,
1110
useActions,
@@ -298,11 +297,10 @@ export function ProjectsNav(props: ProjectsNavProps) {
298297
function renderTabBar0(tabBarProps, DefaultTabBar) {
299298
return renderTabBar(tabBarProps, DefaultTabBar, {
300299
[activeTopTab]: {
301-
border: "1px solid #d3d3d3",
302-
borderRadius: "10px",
303-
// negative margin to prevent moving when adding the border above.
304-
margin: "-1px -1px 0 -1px",
300+
border: "2px solid #d3d3d3",
301+
borderRadius: "8px",
305302
},
303+
"": { border: "2px solid transparent", borderRadius: "8px" },
306304
});
307305
}
308306

0 commit comments

Comments
 (0)