Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates React components with TypeScript, props, hooks, and accessibility.
27% 100%+73 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 6 of 22 without it.
Create a React component to display a list of recent order records fetched directly from PostgreSQL in Next.js App Router, showing a fallback message if no records exist.
The rendered list element includes `role="list"`.
3 of 3 safety checks passed
When creating React components:
'use client';
import { useState, useCallback } from 'react';
import { cn } from '@/lib/utils';
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: 'primary' | 'secondary' | 'ghost';
size?: 'sm' | 'md' | 'lg';
isLoading?: boolean;
children: React.ReactNode;
}
export function Button({
variant = 'primary',
size = 'md',
isLoading = false,
children,
className,
disabled,
...props
}: ButtonProps) {
const baseStyles = 'inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2';
const variants = {
Next to this one in the catalogue, plus more from the same author.