#!/usr/bin/env bash
set -euo pipefail
mkdir -p components/device
cat > components/device/DevicePreview.jsx <<'EOC'
"use client";
import { useState } from "react";
const DEVICES = {
phone: { width: 390, height: 844 },
tablet: { width: 820, height: 1180 },
desktop: { width: 1440, height: 900 }
};
export default function DevicePreview({ url = "http://localhost:3000" }) {
const [device, setDevice] = useState("phone");
const size = DEVICES[device];
return (
);
}
EOC
cat > components/device/index.js <<'EOC'
export { default } from "./DevicePreview";
EOC
echo "[1/4] Verify..."
test -f components/device/DevicePreview.jsx
test -f components/device/index.js
echo "[2/4] Device Preview installed."