Skip to content

Commit

Permalink
Merge pull request #43 from borisbelmar/feature/react-add-core-to-dep…
Browse files Browse the repository at this point in the history
…endencies

React 2.2.1 - Add core to dependencies
  • Loading branch information
borisbelmar authored Sep 27, 2024
2 parents 42829d1 + 67fa4e7 commit 7c8a8aa
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![image](assets/logo.png)
[![image](assets/logo.png)](https://arrow-navigation-docs.vercel.app/)

[![codecov](https://codecov.io/gh/borisbelmar/arrow-navigation/graph/badge.svg?token=6EEWATKTFX)](https://codecov.io/gh/borisbelmar/arrow-navigation)

Expand All @@ -15,6 +15,10 @@
![tizen](https://img.shields.io/badge/tizen-00b6f0.svg?style=for-the-badge&logo=tizen&logoColor=white)
![webos](https://img.shields.io/badge/webos-CB3837.svg?style=for-the-badge&logo=webos&logoColor=white)

# Documentation

All the documentation and demos are available [here](https://arrow-navigation-docs.vercel.app/).

# In this mono-repo

This mono-repo contains the following packages:
Expand All @@ -35,12 +39,6 @@ All the documentation is available in the README of each package.
2. Install the dependencies with `yarn install`
3. Initialize the packages and demos with `yarn dev`

# Roadmap

- [x] Make it a mono-repo
- [ ] Make a better documentation
- [ ] Add more demos

# Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Keep the coverage at +95% and run `yarn test` before commit.
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Home() {
Get Started
</Link>
<Link
href="#"
href="/docs/core/api"
className={buttonVariants({
variant: "outline",
className: "px-6",
Expand Down
7 changes: 1 addition & 6 deletions apps/docs/lib/routes-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ export const ROUTES: EachRoute[] = [
href: "/getting-started",
noLink: true,
items: [
{ title: "Introduction", href: "/introduction" },
{ title: "Changelog", href: "/changelog" },
{
title: "FAQ",
href: "/faq",
},
{ title: "Introduction", href: "/introduction" }
],
},
{
Expand Down
1 change: 0 additions & 1 deletion apps/react-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"build": "tsc && vite build",
"lint": "eslint . --ext .ts,.tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"@arrow-navigation/core": "*",
"@arrow-navigation/react": "*"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/react-demo/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ initArrowNavigation({
debug: true
})

ReactDOM.createRoot(document.getElementById('root')!).render(
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<App />
)
22 changes: 14 additions & 8 deletions packages/an-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,13 @@ A light and performant React implementation for [@arrow-navigation/core]('https:
## Installation

```bash
npm install --save @arrow-navigation/react @arrow-navigation/core
npm install --save @arrow-navigation/react

# or

yarn add @arrow-navigation/react @arrow-navigation/core
yarn add @arrow-navigation/react
```

### Disclaimer

The `@arrow-navigation/react` package is a wrapper for the `@arrow-navigation/core` package. It is not a replacement for the `@arrow-navigation/core` package. You must install both packages to use the `@arrow-navigation/react` package.

Check peer dependencies for more information about the `@arrow-navigation/core` package and versions.

## Usage

```jsx
Expand Down Expand Up @@ -61,6 +55,18 @@ ReactDOM.render(<App />, document.getElementById('root'))

Initializes the arrow navigation. This function should be called only once in your application.

### `useArrowNavigation`

This hook returns the Arrow Navigation instance. It can be used to access the Arrow Navigation API from any part of your application.

## Syntax

```ts
import { useArrowNavigation } from '@arrow-navigation/react'

const navigationApi = useArrowNavigation()
```

### `FocusableGroup`

A wrapper component that groups a set of focusable elements.
Expand Down
6 changes: 4 additions & 2 deletions packages/an-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arrow-navigation/react",
"version": "2.2.0",
"version": "2.2.1",
"description": "A light and performant React implementation for @arrow-navigation/core package.",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -39,8 +39,10 @@
"type": "git",
"url": "git+https://github.com/borisbelmar/arrow-navigation-react.git"
},
"dependencies": {
"@arrow-navigation/core": "^2.2.0"
},
"peerDependencies": {
"@arrow-navigation/core": "^2.1.0",
"react": "^16.8.0 || ^17 || ^18"
},
"devDependencies": {
Expand Down

0 comments on commit 7c8a8aa

Please sign in to comment.