Merge pull request #5644 from ConnectAI-E/fix/siderbar-style
fix: sidebar style
This commit is contained in:
commit
8d2003fe68
|
@ -140,6 +140,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
&-narrow {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-logo {
|
.sidebar-logo {
|
||||||
|
|
|
@ -165,11 +165,17 @@ export function SideBarHeader(props: {
|
||||||
subTitle?: string | React.ReactNode;
|
subTitle?: string | React.ReactNode;
|
||||||
logo?: React.ReactNode;
|
logo?: React.ReactNode;
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
shouldNarrow?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const { title, subTitle, logo, children } = props;
|
const { title, subTitle, logo, children, shouldNarrow } = props;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<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-container"]}>
|
||||||
<div className={styles["sidebar-title"]} data-tauri-drag-region>
|
<div className={styles["sidebar-title"]} data-tauri-drag-region>
|
||||||
{title}
|
{title}
|
||||||
|
@ -227,6 +233,7 @@ export function SideBar(props: { className?: string }) {
|
||||||
title="NextChat"
|
title="NextChat"
|
||||||
subTitle="Build your own AI assistant."
|
subTitle="Build your own AI assistant."
|
||||||
logo={<ChatGptIcon />}
|
logo={<ChatGptIcon />}
|
||||||
|
shouldNarrow={shouldNarrow}
|
||||||
>
|
>
|
||||||
<div className={styles["sidebar-header-bar"]}>
|
<div className={styles["sidebar-header-bar"]}>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
|
Loading…
Reference in New Issue