({ onSelectConfig }: ExampleConfigsProps)
| 69 | } |
| 70 | |
| 71 | export function ExampleConfigs({ onSelectConfig }: ExampleConfigsProps) { |
| 72 | return ( |
| 73 | <div className="bg-white border rounded-md p-4"> |
| 74 | <div className="grid grid-cols-1 gap-3"> |
| 75 | {EXAMPLE_CONFIGS.map((example) => ( |
| 76 | <div |
| 77 | key={example.name} |
| 78 | className="border rounded-md p-3 hover:border-gray-500 hover:bg-gray-50 transition-colors duration-200" |
| 79 | > |
| 80 | <div className="flex justify-between items-start"> |
| 81 | <div className="flex"> |
| 82 | <div className="mt-1 mr-2">{example.icon}</div> |
| 83 | <div> |
| 84 | <h4 className="font-medium">{example.name}</h4> |
| 85 | <p className="text-sm text-gray-600">{example.description}</p> |
| 86 | </div> |
| 87 | </div> |
| 88 | <button |
| 89 | onClick={() => onSelectConfig(example.config)} |
| 90 | className="px-2 py-1 bg-gray-800 text-white text-xs rounded hover:bg-gray-700 flex items-center" |
| 91 | > |
| 92 | Use This |
| 93 | <ArrowRight className="ml-1 h-3 w-3" /> |
| 94 | </button> |
| 95 | </div> |
| 96 | <div className="mt-2"> |
| 97 | <pre className="text-xs bg-gray-50 p-2 rounded overflow-auto max-h-24"> |
| 98 | {JSON.stringify(example.config, null, 2)} |
| 99 | </pre> |
| 100 | </div> |
| 101 | </div> |
| 102 | ))} |
| 103 | </div> |
| 104 | </div> |
| 105 | ); |
| 106 | } |
nothing calls this directly
no outgoing calls
no test coverage detected