Skip to content

Commit 1c5273e

Browse files
committed
Cleaning up the component names and better organizing the components
1 parent 11287f5 commit 1c5273e

File tree

14 files changed

+287
-346
lines changed

14 files changed

+287
-346
lines changed

package-lock.json

Lines changed: 8 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@radix-ui/react-slot": "^1.1.1",
4646
"@radix-ui/react-toggle": "^1.1.1",
4747
"@radix-ui/react-toggle-group": "^1.1.1",
48-
"@radix-ui/react-tooltip": "^1.1.5",
48+
"@radix-ui/react-tooltip": "^1.1.6",
4949
"class-variance-authority": "^0.7.1",
5050
"clsx": "^2.1.1",
5151
"lucide-react": "^0.468.0",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { SidebarInset } from '@/components/ui/sidebar';
2+
import * as React from 'react';
3+
4+
interface AppContentProps extends React.ComponentProps<'div'> {
5+
variant?: 'header' | 'sidebar';
6+
}
7+
8+
export function AppContent({ variant = 'header', children, ...props }: AppContentProps) {
9+
if (variant === 'sidebar') {
10+
return <SidebarInset {...props}>{children}</SidebarInset>;
11+
}
12+
13+
return (
14+
<main className="flex h-full flex-1 flex-col gap-4 rounded-xl max-w-7xl mx-auto w-full" {...props}>
15+
{children}
16+
</main>
17+
);
18+
}

0 commit comments

Comments
 (0)