mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2026-02-12 15:52:47 +00:00
fix(components): Fix conditional rendering logic in kids elements files
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 271 KiB |
@@ -382,7 +382,7 @@ export function DragDropPrompt({
|
||||
>
|
||||
{t("check")}
|
||||
</button>
|
||||
) : (
|
||||
) : !correct ? (
|
||||
<button
|
||||
onClick={handleReset}
|
||||
className="px-6 py-3 bg-[#8B4513] hover:bg-[#A0522D] text-white font-bold text-xl transition-colors"
|
||||
@@ -390,7 +390,7 @@ export function DragDropPrompt({
|
||||
>
|
||||
{t("retry")}
|
||||
</button>
|
||||
)}
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -173,14 +173,14 @@ export function ExampleMatcher({
|
||||
>
|
||||
{t("check")}
|
||||
</button>
|
||||
) : (
|
||||
) : !isCorrect ? (
|
||||
<button
|
||||
onClick={handleReset}
|
||||
className="px-6 py-2 rounded-lg font-bold bg-[#6366F1] hover:bg-[#4F46E5] text-white"
|
||||
>
|
||||
{t("retry")}
|
||||
</button>
|
||||
)}
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{/* Result feedback */}
|
||||
|
||||
@@ -306,12 +306,12 @@ export function MagicWords({
|
||||
<Check className="h-5 w-5 mr-2" />
|
||||
{t("check")}
|
||||
</Button>
|
||||
) : (
|
||||
) : !allCorrect ? (
|
||||
<Button onClick={handleReset} variant="outline" className="rounded-full h-12 text-xl px-6">
|
||||
<RefreshCw className="h-5 w-5 mr-2" />
|
||||
{t("retry")}
|
||||
</Button>
|
||||
)}
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -225,14 +225,16 @@ export function PromptVsMistake({
|
||||
<p className="text-sm text-[#5D4037] m-0">{promiMessage}</p>
|
||||
</div>
|
||||
)}
|
||||
<button
|
||||
onClick={handleReset}
|
||||
className="mt-3 inline-flex items-center gap-1 px-4 py-2 bg-[#8B4513] hover:bg-[#A0522D] text-white text-sm font-bold transition-colors"
|
||||
style={{ clipPath: smallPixelClipPath }}
|
||||
>
|
||||
<PixelRefreshIcon />
|
||||
{t("tryAgain")}
|
||||
</button>
|
||||
{!isCorrect && (
|
||||
<button
|
||||
onClick={handleReset}
|
||||
className="mt-3 inline-flex items-center gap-1 px-4 py-2 bg-[#8B4513] hover:bg-[#A0522D] text-white text-sm font-bold transition-colors"
|
||||
style={{ clipPath: smallPixelClipPath }}
|
||||
>
|
||||
<PixelRefreshIcon />
|
||||
{t("tryAgain")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -207,7 +207,7 @@ export function WordPredictor({
|
||||
)}
|
||||
|
||||
{/* Reset button */}
|
||||
{submitted && (
|
||||
{submitted && !isCorrect && (
|
||||
<button
|
||||
onClick={handleReset}
|
||||
className="px-6 py-2 font-bold bg-[#6366F1] hover:bg-[#4F46E5] text-white"
|
||||
|
||||
@@ -1150,7 +1150,7 @@ export function PromptForm({ categories, tags, initialData, initialContributors
|
||||
value={field.value}
|
||||
onChange={field.onChange}
|
||||
language="markdown"
|
||||
placeholder={`# My Skill\n\nDescribe what this skill does and how the agent should use it.\n\n## Instructions\n\n- Step 1: ...\n- Step 2: ...`}
|
||||
placeholder={`---\nname: my-skill-name\ndescription: A clear description of what this skill does and when to use it\n---\n\n# My Skill\n\nDescribe what this skill does and how the agent should use it.\n\n## Instructions\n\n- Step 1: ...\n- Step 2: ...`}
|
||||
minHeight="400px"
|
||||
className="border-0 rounded-none"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user