1.0.13 • Published 10 months ago
harmonyutils v1.0.13
harmonyutils
A collection of React utilities and components for building beautiful user interfaces.
Components
Workflow Component
A React component for visualizing workflow steps and progress.
Installation
npm install harmonyutilsUsage
import { Workflow } from 'harmonyutils';
const steps = [
{
id: '1',
title: 'Step 1',
status: 'completed'
},
{
id: '2',
title: 'Step 2',
status: 'in-progress'
},
{
id: '3',
title: 'Step 3',
status: 'pending'
}
];
function App() {
const handleStepClick = (stepId: string) => {
console.log(`Clicked step ${stepId}`);
};
return (
<Workflow
steps={steps}
currentStep="2"
onStepClick={handleStepClick}
/>
);
}Components API
Workflow
A component for displaying a sequence of steps with their current status.
Props
| Prop | Type | Description |
|---|---|---|
| steps | WorkflowStep[] | Array of workflow steps |
| currentStep | string (optional) | ID of the current active step |
| onStepClick | (stepId: string) => void (optional) | Callback function when a step is clicked |
WorkflowStep Interface
interface WorkflowStep {
id: string;
title: string;
status: 'pending' | 'in-progress' | 'completed' | 'failed';
}Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
1.0.31
9 months ago
1.0.30
9 months ago
1.0.29
9 months ago
1.0.28
10 months ago
1.0.27
10 months ago
1.0.26
10 months ago
1.0.25
10 months ago
1.0.24
10 months ago
1.0.23
10 months ago
1.0.22
10 months ago
1.0.21
10 months ago
1.0.20
10 months ago
1.0.19
10 months ago
1.0.18
10 months ago
1.0.17
10 months ago
1.0.16
10 months ago
1.0.15
10 months ago
1.0.14
10 months ago
1.0.13
10 months ago
1.0.12
10 months ago
1.0.11
11 months ago
1.0.10
11 months ago
1.0.9
11 months ago
1.0.8
11 months ago
1.0.7
11 months ago
1.0.6
11 months ago
1.0.5
11 months ago
1.0.4
11 months ago
1.0.3
11 months ago
1.0.2
11 months ago
1.0.1
11 months ago
1.0.0
11 months ago