Remove duplicate node logic, UI Update, flatten build output (#586)
* refactor nodes to getNodes fn. ui updates * fixed several styling issues * fix: message specific styling/overflow * added footer, fixed tests. styling * fix: added theme support back to app component * fix: hide emojis/reactions * fix: added more padding to content element * fix: fixed padding in content element * updated color scheme * fix: more dark mode styling improvements * fix: padding and alignment fixes * fix: prevent left sidebar collapse, added battery component * fix: change scrollbars to "tiny" style, improved message scrolling, fixed bug with message input * message store fixes, ui fixes * fix: disabled message persistance until after release
This commit is contained in:
@@ -1,19 +1,42 @@
|
||||
import { Heading } from "../Typography/Heading.tsx";
|
||||
import React from "react";
|
||||
import { cn } from "@core/utils/cn.ts";
|
||||
import { Heading } from "@components/UI/Typography/Heading.tsx";
|
||||
import { useSidebar } from "@core/stores/sidebarStore.tsx";
|
||||
|
||||
export interface SidebarSectionProps {
|
||||
interface SidebarSectionProps {
|
||||
label: string;
|
||||
subheader?: string;
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const SidebarSection = ({
|
||||
label: title,
|
||||
label,
|
||||
children,
|
||||
}: SidebarSectionProps) => (
|
||||
<div className="px-4 py-2">
|
||||
<Heading as="h4" className="mb-3 ml-2">
|
||||
{title}
|
||||
</Heading>
|
||||
<div className="space-y-1">{children}</div>
|
||||
</div>
|
||||
);
|
||||
className,
|
||||
}: SidebarSectionProps) => {
|
||||
const { isCollapsed } = useSidebar();
|
||||
return (
|
||||
<div className={cn(
|
||||
"py-2",
|
||||
isCollapsed ? 'px-0' : 'px-4',
|
||||
className,
|
||||
)}>
|
||||
|
||||
<Heading as="h3" className={cn(
|
||||
'mb-2',
|
||||
'uppercase tracking-wider text-md',
|
||||
'transition-all duration-300 ease-in-out',
|
||||
'whitespace-nowrap overflow-hidden',
|
||||
isCollapsed
|
||||
? 'opacity-0 max-w-0 h-0 invisible px-0 mb-0'
|
||||
: 'opacity-100 max-w-xs h-auto visible px-1 mb-1'
|
||||
)}>
|
||||
{label}
|
||||
</Heading>
|
||||
|
||||
<div className="space-y-0.5">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user