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