Patterns

Change history (audit)

Who, what, when and why; expand to see each field old → new. The newest entry starts open.

  1. KA

    “Fuel and staff costs went up in September; Banani already charges ৳70.”

    Car · first hour
    ৳60→৳70
    Car · each next hour
    ৳40→৳50
    Daily cap
    ৳400→৳450
  2. NJ
  3. TS

    “September statement for the auditor.”

  4. KA

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { ChangeHistory } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<ChangeHistory>

src/components/patterns/timeline.tsx
PropTypeDefaultDescription
entriesrequiredChangeEntry[]—
defaultOpennumber1How many of the newest entries start expanded.
labels{ changes?: (n: number) => string; empty?: string }—
classNamestring—

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui