feat: Add HomeLayout and ConnectedLayout components with Storybook stories
- HomeLayout: AppShell with header (title + theme toggle) for disconnected state - ConnectedLayout: AppShell with server name, status indicator, tab navigation, theme toggle, and disconnect button for connected state All 6 phases of the Storybook component plan are now complete: 12 atoms, 25 molecules, 7 organisms, 2 layouts = 46 components total Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
019e10429d
commit
d53c3d338f
1 changed files with 211 additions and 0 deletions
|
|
@ -0,0 +1,45 @@
|
|||
import type { Meta, StoryObj } from '@storybook/react-vite';
|
||||
import { fn } from 'storybook/test';
|
||||
import { Container, Paper, Stack, Text } from '@mantine/core';
|
||||
import { HomeLayout } from './HomeLayout';
|
||||
|
||||
const meta: Meta<typeof HomeLayout> = {
|
||||
title: 'Layouts/HomeLayout',
|
||||
component: HomeLayout,
|
||||
parameters: { layout: 'fullscreen' },
|
||||
args: {
|
||||
onToggleTheme: fn(),
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof HomeLayout>;
|
||||
|
||||
export const Light: Story = {
|
||||
args: {
|
||||
children: <Text>Page content goes here</Text>,
|
||||
},
|
||||
};
|
||||
|
||||
export const WithContent: Story = {
|
||||
args: {
|
||||
children: (
|
||||
<Container>
|
||||
<Stack>
|
||||
<Paper p="md" shadow="xs">
|
||||
<Text fw={500}>Local Dev Server</Text>
|
||||
<Text size="sm" c="dimmed">npx @modelcontextprotocol/server-filesystem</Text>
|
||||
</Paper>
|
||||
<Paper p="md" shadow="xs">
|
||||
<Text fw={500}>Database Tools</Text>
|
||||
<Text size="sm" c="dimmed">python -m mcp_server_sqlite</Text>
|
||||
</Paper>
|
||||
<Paper p="md" shadow="xs">
|
||||
<Text fw={500}>Remote API Server</Text>
|
||||
<Text size="sm" c="dimmed">https://api.example.com/mcp</Text>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</Container>
|
||||
),
|
||||
},
|
||||
};
|
||||
Loading…
Reference in a new issue