https://github.com/odigos-io/ui-containers
Complex-Containers library for Odigos User Interfaces
https://github.com/odigos-io/ui-containers
react reactjs
Last synced: 2 months ago
JSON representation
Complex-Containers library for Odigos User Interfaces
- Host: GitHub
- URL: https://github.com/odigos-io/ui-containers
- Owner: odigos-io
- Created: 2025-02-03T14:40:51.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-05T17:41:43.000Z (3 months ago)
- Last Synced: 2025-04-07T12:09:02.009Z (2 months ago)
- Topics: react, reactjs
- Language: TypeScript
- Homepage: https://npmjs.com/package/@odigos/ui-containers
- Size: 872 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Odigos UI Containers
This library is not re-usable, these "containers" are considered complex components that contain logic, they designed to re-use across multiple deployments of the same Odigos UI (e.g. cluster, cloud, etc.)
## Installation
Using **npm**:
```shell
npm i @odigos/ui-containers
```Using **yarn**:
```shell
yarn add @odigos/ui-containers
```## Usage
Wrap your app with the theme provider from [@odigos/ui-theme](https://github.com/odigos-io/ui-theme):
```tsx
import Theme from '@odigos/ui-theme'const AppProviders = () => {
return (
)
}
```Import a container, and call it with it's props:
```tsx
import { useEffect } from 'react'
import { NOTIFICATION_TYPE } from '@odigos/ui-utils'
import { ToastList, useNotificationStore } from '@odigos/ui-containers'const App = () => {
const { addNotification } = useNotificationStore()useEffect(() => {
addNotification({
type: NOTIFICATION_TYPE.SUCCESS,
title: 'Mounted',
message: 'App mounted successfully',
})
}, [])return
}
```