1.0.31 • Published 3 months ago
harmonyutils v1.0.31
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 harmonyutils
Usage
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
3 months ago
1.0.30
3 months ago
1.0.29
3 months ago
1.0.28
3 months ago
1.0.27
4 months ago
1.0.26
4 months ago
1.0.25
4 months ago
1.0.24
4 months ago
1.0.23
4 months ago
1.0.22
4 months ago
1.0.21
4 months ago
1.0.20
4 months ago
1.0.19
4 months ago
1.0.18
4 months ago
1.0.17
4 months ago
1.0.16
4 months ago
1.0.15
4 months ago
1.0.14
4 months ago
1.0.13
4 months ago
1.0.12
4 months ago
1.0.11
5 months ago
1.0.10
5 months ago
1.0.9
5 months ago
1.0.8
5 months ago
1.0.7
5 months ago
1.0.6
5 months ago
1.0.5
5 months ago
1.0.4
5 months ago
1.0.3
5 months ago
1.0.2
5 months ago
1.0.1
5 months ago
1.0.0
5 months ago