Skip to main content

TaskBoxProps

Props for the TaskBox component

Example

<TaskBox
title="Task Title"
description="This is a brief description of the task."
codeSnippet="console.log('Hello, World!');"
testCases={[
{ input: 'input1', expectedOutput: 'output1' },
{ input: 'input2', expectedOutput: 'output2' },
]}
initialCompleted={false}
onCompletedChange={(completed) => console.log('Task completed:', completed)}
/>

Properties

codeSnippet

codeSnippet: string;

Code snippet to display


description

description: string;

Description of the task


initialCompleted?

optional initialCompleted: boolean;

Initial completed state


onCompletedChange()?

optional onCompletedChange: (completed) => void;

Optional callback when completed state changes

Parameters

ParameterType
completedboolean

Returns

void


testCases?

optional testCases: TestCase[];

Test cases for the task


title

title: string;

Title of the task