npm install --save-dev vitest jsdom
- React Testing Library
// https://github.com/Klerith/bolt-product-editor | |
import { AdminTitle } from '@/admin/components/AdminTitle'; | |
import { useParams } from 'react-router'; | |
import { useState } from 'react'; | |
import { X, Plus, Upload, Tag, SaveAll } from 'lucide-react'; | |
import { Button } from '@/components/ui/button'; | |
import { Link } from 'react-router'; |
import { ChevronLeft, ChevronRight } from 'lucide-react'; | |
import { Button } from '../ui/button'; | |
import { useSearchParams } from 'react-router'; | |
interface Props { | |
totalPages: number; | |
} | |
export const CustomPagination = ({ totalPages }: Props) => { | |
const [searchParams, setSearchParams] = useSearchParams(); |
export interface User { | |
id: number; | |
name: string; | |
title: string; | |
tags: string[]; | |
contact: Contact; | |
about: string; | |
experience: Experience[]; | |
stats: Stats; | |
skills: string[]; |
import { useState } from 'react'; | |
interface Comment { | |
id: number; | |
text: string; | |
optimistic?: boolean; | |
} | |
export const InstagromApp = () => { | |
const [comments, setComments] = useState<Comment[]>([ |
// ! Importante: | |
// Es necesario componentes de Shadcn/ui | |
// https://ui.shadcn.com/docs/installation/vite | |
import React, { useState } from 'react'; | |
import { Button } from '@/components/ui/button'; | |
import { Input } from '@/components/ui/input'; | |
import { Card, CardContent } from '@/components/ui/card'; | |
import { SkipForward, Play } from 'lucide-react'; |
import { useState } from 'react'; | |
import { Plus, Trash2, Check } from 'lucide-react'; | |
import { Button } from '@/components/ui/button'; | |
import { Input } from '@/components/ui/input'; | |
import { Checkbox } from '@/components/ui/checkbox'; | |
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; | |
interface Todo { |
// ! Importante: | |
// Es necesario componentes de Shadcn/ui | |
// https://ui.shadcn.com/docs/installation/vite | |
import React, { useState } from 'react'; | |
import { Button } from '@/components/ui/button'; | |
import { Input } from '@/components/ui/input'; | |
import { Card, CardContent } from '@/components/ui/card'; | |
import { SkipForward, Play } from 'lucide-react'; |
export const TrafficLight = () => { | |
return ( | |
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-gray-900 to-slate-800 flex items-center justify-center p-4"> | |
<div className="flex flex-col items-center space-y-8"> | |
<div className="w-32 h-32 bg-red-500 rounded-full"></div> | |
<div className="w-32 h-32 bg-yellow-500 rounded-full"></div> |
npm install --save-dev vitest jsdom
Descargar hoja de atajos de React