Skip to content

Commit

Permalink
fix: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BenElferink committed Feb 3, 2025
1 parent 1038d45 commit 91a2d79
Showing 1 changed file with 15 additions and 30 deletions.
45 changes: 15 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,37 @@
# Odigos UI Components
# Odigos UI Utils

## Installation

Using **npm**:

```shell
npm i @odigos/ui-components
npm i @odigos/ui-utils
```

Using **yarn**:

```shell
yarn add @odigos/ui-components
yarn add @odigos/ui-utils
```

## Usage

Wrap your app with the theme provider:
Import a util, and call it with it's params:

```tsx
import { Theme } from '@odigos/ui-components'

const AppProviders = () => {
const darkMode = true

return (
<Theme.Provider darkMode={darkMode}>
<App />
</Theme.Provider>
)
}
```

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

```tsx
import { Button, PlusIcon } from '@odigos/ui-components'
import { useKeyDown } from '@odigos/ui-utils'

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

return (
<Button onClick={handleClick}>
<PlusIcon size={20} />
Add New...
</Button>
useKeyDown(
{
key: 'Enter',
active: true,
},
() => {
console.log('key pressed')
}
)

return <div>hi mom</div>
}
```

0 comments on commit 91a2d79

Please sign in to comment.