Skip to content

Latest commit

 

History

History
72 lines (55 loc) · 1.64 KB

README.md

File metadata and controls

72 lines (55 loc) · 1.64 KB

@lawsafrica/law-widgets-react


React wrapper component library built from @lawsafrica/law-widgets

Installation

npm

npm install @lawsafrica/law-widgets-react

OR

yarn

yarn add @lawsafrica/law-widgets-react

Getting started

Here is a basic example of how to use LaTableOfContents in React:

import { LaTableOfContents } from "@lawsafrica/law-widgets-react";

function App() {
  const items = [
    {
      title: 'Entire document',
      children: [
        {
          title: 'Ch. 1 – ',
          children: [
            {
              title: 'Part B',
            },
          ],
        },
        {
          title: 'Ch. 2 – ',
        },
      ],
    }
  ]
  return (
    <div>
      <LaTableOfContents items={items}/>
    </div>
  );
}

export default App;

List of components

View more examples of our various components.

Content components

Behaviour components