'use client'; import React from 'react'; import styles from './broken-grid.module.css'; export interface GridItem { title: string; description?: string; span?: [number, number]; } export interface BrokenGridProps { items: GridItem[]; columns?: number; chaosLevel?: number; truncateText?: boolean; hoverShadow?: boolean; borderStyle?: 'solid' | 'dashed' | 'double'; className?: string; } export const BrokenGrid = ({ items, columns = 3, chaosLevel = 0.5, truncateText = true, hoverShadow = true, borderStyle = 'solid', className = '' }: BrokenGridProps) => { const getTransform = (i: number) => { const rot = (Math.sin(i) * chaosLevel * 5); const transX = (Math.cos(i * 1.5) * chaosLevel * 20); const transY = (Math.sin(i * 2.3) * chaosLevel * 15); return `translate(${transX}px, ${transY}px) rotate(${rot}deg)`; }; return (
{item.description}
)}