docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Create a React component that renders customizable progress indicators with various styling configurations.
Build a component that displays progress bars with configurable appearance:
renderLineProgress(percent: number, options: LineOptions) that returns a React element displaying a linear progress bar with the specified percentage and styling optionsrenderCircleProgress(percent: number, options: CircleOptions) that returns a React element displaying a circular progress bar with the specified percentage and styling optionsThe LineOptions interface should include:
width: thickness of the progress linecolor: color of the progress indicatorbackgroundColor: color of the background tracklineEnd: style of line endings ('rounded', 'flat', or 'extended')The CircleOptions interface should include:
width: thickness of the progress strokecolor: color of the progress indicatorbackgroundColor: color of the background trackrenderLineProgress function should support displaying multiple progress segments when percent is an array of numbers and color is an array of color stringsrenderCircleProgress function should support gradient colors when the color option is an object with percentage keys (e.g., { "0%": "#ff0000", "100%": "#00ff00" })interface LineOptions {
width: number;
color: string | string[];
backgroundColor: string;
lineEnd: 'rounded' | 'flat' | 'extended';
}
interface CircleOptions {
width: number;
color: string | { [key: string]: string };
backgroundColor: string;
}
export function renderLineProgress(
percent: number | number[],
options: LineOptions
): React.ReactElement;
export function renderCircleProgress(
percent: number,
options: CircleOptions
): React.ReactElement;Provides React progress bar components with customizable styling.