mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 06:09:08 +03:00
- Created new inline TableQuickstart component with expandable card pattern - Added feature flag support (control, ai, templates variants) - Implemented smooth Framer Motion animations for expand/collapse - Ported AI generation and template selection from legacy components - Integrated with GettingStartedSection using PostHog feature flag - Organized components into inline/ and legacy/ folders for clean separation - Maintains all existing functionality while providing better UX Key improvements: - No navigation away from Getting Started section - Progressive disclosure with smooth animations - Supports A/B testing with feature flag variants - Reuses existing API endpoints and logic
39 lines
1013 B
TypeScript
39 lines
1013 B
TypeScript
import { motion } from 'framer-motion'
|
|
import { cn } from 'ui'
|
|
import { TablePickerSkeleton } from '../legacy/TablePickerSkeleton'
|
|
import { TablePicker } from '../legacy/TablePicker'
|
|
import type { TableSuggestion } from '../legacy/types'
|
|
import { itemVariants } from './animations'
|
|
|
|
interface TablePreviewGridProps {
|
|
tables: TableSuggestion[]
|
|
onSelectTable: (table: TableSuggestion) => void
|
|
loading: boolean
|
|
isGenerating: boolean
|
|
}
|
|
|
|
export function TablePreviewGrid({
|
|
tables,
|
|
onSelectTable,
|
|
loading,
|
|
isGenerating,
|
|
}: TablePreviewGridProps) {
|
|
if (isGenerating) {
|
|
return (
|
|
<motion.div variants={itemVariants}>
|
|
<TablePickerSkeleton />
|
|
</motion.div>
|
|
)
|
|
}
|
|
|
|
if (tables.length === 0) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<motion.div variants={itemVariants} className="space-y-3">
|
|
<p className="text-sm text-foreground-light">Select a table to create:</p>
|
|
<TablePicker tables={tables} onSelectTable={onSelectTable} loading={loading} />
|
|
</motion.div>
|
|
)
|
|
} |