Skip to content

Commit cf5320e

Browse files
authored
🐛 fix(sidebar-drawer): Fix drawer positioning and title style (lobehub#11655)
- Add explicit width and position constraints to drawer root style - Set title font weight to 600 for better readability - Add debug button for all agents drawer toggle (temporary) Resolves LOBE-3356
1 parent d8121d3 commit cf5320e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/features/NavPanel/SideBarDrawer.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ interface SideBarDrawerProps {
2323

2424
const SideBarDrawer = memo<SideBarDrawerProps>(
2525
({ subHeader, open, onClose, children, title, action }) => {
26+
const size = 280;
2627
return (
2728
<Drawer
2829
closable={false}
@@ -33,9 +34,13 @@ const SideBarDrawer = memo<SideBarDrawerProps>(
3334
open={open}
3435
placement="left"
3536
rootStyle={{
37+
bottom: 0,
38+
overflow: 'hidden',
3639
position: 'absolute',
40+
top: 0,
41+
width: `${size}px`,
3742
}}
38-
size={280}
43+
size={size}
3944
styles={{
4045
body: {
4146
background: cssVar.colorBgLayout,
@@ -58,7 +63,12 @@ const SideBarDrawer = memo<SideBarDrawerProps>(
5863
<SideBarHeaderLayout
5964
left={
6065
typeof title === 'string' ? (
61-
<Text ellipsis fontSize={14} style={{ paddingLeft: 4 }} weight={400}>
66+
<Text
67+
ellipsis
68+
fontSize={14}
69+
style={{ fontWeight: 600, paddingLeft: 8 }}
70+
weight={400}
71+
>
6272
{title}
6373
</Text>
6474
) : (

0 commit comments

Comments
 (0)