import { Column, Container, CrossAxisAlignment, BorderAll } from '@dynshift/layr';
const posts = [
{
id: 1,
title: "Introducing Layr 1.0",
content: "We're excited to announce the first stable release of Layr, bringing Flutter-inspired layout components to React. Build beautiful UIs with declarative, type-safe components.",
timestamp: "2 hours ago"
},
{
id: 2,
title: "Understanding MainAxisAlignment",
content: "Learn how to properly distribute children along the main axis using spaceBetween, spaceAround, and spaceEvenly. These alignment options give you precise control over layout spacing.",
timestamp: "5 hours ago"
},
{
id: 3,
title: "Building Responsive Layouts",
content: "Combine Column, Row, and Stack to create fully responsive layouts. Use mainAxisSize and crossAxisAlignment to adapt your UI to different screen sizes seamlessly.",
timestamp: "1 day ago"
},
{
id: 4,
title: "BoxDecoration Deep Dive",
content: "BoxDecoration provides powerful styling capabilities including gradients, shadows, borders, and background images. This post covers advanced decoration patterns and best practices.",
timestamp: "2 days ago"
},
{
id: 5,
title: "TypeScript Support",
content: "All Layr components are fully typed with comprehensive IntelliSense support. Get autocomplete suggestions, type checking, and inline documentation as you code.",
timestamp: "3 days ago"
},
{
id: 6,
title: "Migration Guide",
content: "Moving from traditional CSS layouts to Layr? Our migration guide covers common patterns, conversion strategies, and tips for refactoring existing components.",
timestamp: "4 days ago"
},
{
id: 7,
title: "Performance Optimization",
content: "Layr components are optimized for performance with minimal re-renders and efficient CSS. Learn how to build high-performance UIs with proper component composition.",
timestamp: "5 days ago"
},
{
id: 8,
title: "Community Showcase",
content: "Check out amazing projects built with Layr by our community. From dashboards to landing pages, see what's possible with Flutter-inspired layout components.",
timestamp: "1 week ago"
}
];
export default function FeedExample() {
return (
<Column
crossAxisAlignment={CrossAxisAlignment.start}
spacing={20}
clipBehavior="scroll"
style={{
maxHeight: '600px',
padding: '20px',
backgroundColor: '#0a0a0a'
}}
>
{posts.map((post) => (
<Container
key={post.id}
padding={16}
decoration={{
color: '#1a1a1a',
borderRadius: 8,
border: BorderAll({ width: 1, color: '#2a2a2a' }),
}}
style={{
width: '100%',
transition: 'all 0.2s ease',
cursor: 'pointer'
}}
onClick={() => console.log(`Clicked post: ${post.title}`)}
>
<h3 style={{
color: '#eb1660',
fontSize: '1.25rem',
fontWeight: 600,
marginBottom: '8px'
}}>
{post.title}
</h3>
<p style={{
color: '#a0a0a0',
fontSize: '0.95rem',
lineHeight: '1.6',
marginBottom: '12px'
}}>
{post.content}
</p>
<span style={{
color: '#666',
fontSize: '0.875rem',
fontStyle: 'italic'
}}>
{post.timestamp}
</span>
</Container>
))}
</Column>
);
}