1.0.31 • Published 6 months ago

harmonyutils v1.0.31

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

PropTypeDescription
stepsWorkflowStep[]Array of workflow steps
currentStepstring (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

6 months ago

1.0.30

6 months ago

1.0.29

6 months ago

1.0.28

6 months ago

1.0.27

6 months ago

1.0.26

6 months ago

1.0.25

6 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

7 months ago

1.0.16

7 months ago

1.0.15

7 months ago

1.0.14

7 months ago

1.0.13

7 months ago

1.0.12

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 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