import React from 'react'; import { Card, CardHeader, CardContent, CardTitle } from '../ui/card'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '../ui/tabs'; const TwoColumnLayout = ({children, tabs}) => { const left = React.Children.toArray(children)[0]; const right = React.Children.toArray(children).slice(1); return (
{/* Left Column */}
Messages
{left}
{/* Right Column */}
{tabs.map(t => ( {t} ))} {tabs.map((tab, index) => (
{right[index]}
))}
); }; export default TwoColumnLayout;