import { useState } from 'react';
import { ShoppingCart, Truck, Package, Star, AlertTriangle } from 'lucide-react';
export const MiniCart = () => (
3
{[1, 2, 3].map(i => (
))}
Total:
$297
);
export const MiniCountdown = () => {
const [time] = useState({ d: 12, h: 5, m: 34, s: 22 });
return (
{Object.entries(time).map(([unit, val]) => (
{String(val).padStart(2, '0')}
{unit}
))}
);
};
export const MiniCryptoTicker = () => (
{[
{ symbol: 'BTC', price: '43,250', change: '+2.4%', up: true },
{ symbol: 'ETH', price: '2,280', change: '-0.8%', up: false },
{ symbol: 'SOL', price: '98.50', change: '+5.2%', up: true },
].map(({ symbol, price, change, up }) => (
{symbol}
${price}
{change}
))}
);
export const MiniOrderStatus = () => (
{['Ordered', 'Packed', 'Shipped', 'Delivered'].map((s, i) => (
{i < 2 ? '✓' : i === 2 ? : '○'}
{s}
))}
);
export const MiniProductCard = () => (
Product Name
SKU: PRD-001
$49.99
In Stock
);
export const MiniSalesFunnel = () => (
{[
{ label: 'Visitors', value: '10,000', width: '100%' },
{ label: 'Added to Cart', value: '2,500', width: '70%' },
{ label: 'Checkout', value: '800', width: '45%' },
{ label: 'Purchased', value: '320', width: '25%' },
].map((stage, i) => (
))}
);
export const MiniReviewScore = () => (
{[1, 2, 3, 4, 5].map(i => (
))}
4.2
1,247 reviews
);
export const MiniInventoryAlert = () => (
{[
{ name: 'Widget A', qty: 5 },
{ name: 'Gadget B', qty: 12 },
].map(item => (
{item.name}
{item.qty} left
))}
);
export const MiniConversionRate = () => (
);