Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#5644 from ConnectAI-E/fix/siderbar-…
Browse files Browse the repository at this point in the history
…style

fix: sidebar style
  • Loading branch information
Dogtiti authored Oct 12, 2024
2 parents ad49916 + 9961b51 commit 8d2003f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/components/home.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@
display: flex;
justify-content: space-between;
align-items: center;
&-narrow {
justify-content: center;
}
}

.sidebar-logo {
Expand Down
11 changes: 9 additions & 2 deletions app/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,17 @@ export function SideBarHeader(props: {
subTitle?: string | React.ReactNode;
logo?: React.ReactNode;
children?: React.ReactNode;
shouldNarrow?: boolean;
}) {
const { title, subTitle, logo, children } = props;
const { title, subTitle, logo, children, shouldNarrow } = props;
return (
<Fragment>
<div className={styles["sidebar-header"]} data-tauri-drag-region>
<div
className={`${styles["sidebar-header"]} ${
shouldNarrow ? styles["sidebar-header-narrow"] : ""
}`}
data-tauri-drag-region
>
<div className={styles["sidebar-title-container"]}>
<div className={styles["sidebar-title"]} data-tauri-drag-region>
{title}
Expand Down Expand Up @@ -227,6 +233,7 @@ export function SideBar(props: { className?: string }) {
title="NextChat"
subTitle="Build your own AI assistant."
logo={<ChatGptIcon />}
shouldNarrow={shouldNarrow}
>
<div className={styles["sidebar-header-bar"]}>
<IconButton
Expand Down

0 comments on commit 8d2003f

Please sign in to comment.