Skip to content

odigos-io/ui-components

Repository files navigation

Odigos UI Components

This library contains re-usable components for various Odigos UI deployments, and a library (ui-containers).

Installation

Using npm:

npm i @odigos/ui-components

Using yarn:

yarn add @odigos/ui-components

Usage

Wrap your app with the theme provider from @odigos/ui-theme:

import Theme from '@odigos/ui-theme'

const AppProviders = () => {
  return (
    <Theme.Provider>
      <App />
    </Theme.Provider>
  )
}

Import a component, and call it with it's props:

import { Button } from '@odigos/ui-components'
import { PlusIcon } from '@odigos/ui-icons'

const App = () => {
  const handleClick = () => {
    console.log('clicked')
  }

  return (
    <Button onClick={handleClick}>
      <PlusIcon size={20} />
      Add New...
    </Button>
  )
}