import type { Meta, StoryObj } from '@storybook/react-vite'; import { Text } from './Text'; import { View } from './View'; const meta = { title: 'Components/View', component: View, parameters: { layout: 'centered', }, tags: ['autodocs'], } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { args: { children: 'A basic View container', style: { padding: 20, backgroundColor: '#f5f5f5', borderRadius: 4 }, }, parameters: { docs: { description: { story: 'View is the fundamental layout building block, rendering a styled div element.', }, }, }, }; export const FlexRow: Story = { render: () => ( Item 1 Item 2 Item 3 ), parameters: { docs: { description: { story: 'Views arranged in a horizontal row using flexDirection.', }, }, }, }; export const FlexColumn: Story = { render: () => ( Row 1 Row 2 Row 3 ), parameters: { docs: { description: { story: 'Views stacked vertically in a column layout.', }, }, }, }; export const Nested: Story = { render: () => ( Parent View Child 1 (flex: 1) Child 2 (flex: 2) ), parameters: { docs: { description: { story: 'Nested Views demonstrating flex layout composition.', }, }, }, }; export const WithNativeStyle: Story = { args: { children: 'View with nativeStyle', nativeStyle: { padding: '20px', border: '2px dashed #999', borderRadius: '8px', }, }, parameters: { docs: { description: { story: 'The nativeStyle prop applies styles directly via the style attribute instead of using Emotion CSS.', }, }, }, }; export const CenteredContent: Story = { render: () => ( Centered Content ), parameters: { docs: { description: { story: 'View used to center content both horizontally and vertically.', }, }, }, };