Skip to content

Commit

Permalink
Version Packages (#77)
Browse files Browse the repository at this point in the history
* Version Packages

* Update changelog & docs

* Fix CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: foyarash <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2023
1 parent 16aba39 commit 216ba52
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .changeset/nervous-foxes-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
7 changes: 0 additions & 7 deletions .changeset/smart-books-grab.md

This file was deleted.

12 changes: 9 additions & 3 deletions apps/docs/pages/docs/api-docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ The `fields` property is available in both `list` and `edit` properties.

For the `list` property, it can take the following:

| Name | Description |
| --------- | -------------------------------------------------------------------------------- |
| formatter | a function that takes the field value as a parameter, and that return a JSX node |
| Name | Description |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| formatter | a function that takes the field value as a parameter, and that return a JSX node. It also accepts a second argument which is the [`NextAdmin` context](#nextadmin-context) |

For the `edit` property, it can take the following:

Expand Down Expand Up @@ -319,3 +319,9 @@ const options: NextAdminOptions = {

const adminRouter = await nextAdminRouter(prisma, schema, options);
```

## NextAdmin Context

The `NextAdmin` context is an object containing the following properties:

- `locale`: the locale used by the calling page. (refers to the `accept-language` header).
10 changes: 9 additions & 1 deletion packages/next-admin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @premieroctet/next-admin

## 3.0.0

### Major Changes

- 16aba39: # New feature

- App router is now supported. You can find an exemple of its usage in the example app.
- New context object, currently passed only to the `formatter` function

## 2.0.0

### Major Changes
Expand All @@ -23,7 +32,6 @@
Introduce handler object to handle custom logic for a property in edit mode
Add ability to use input variant in edit mode
Fix datetime-local input to store correct datetime


## 1.4.1

Expand Down
2 changes: 1 addition & 1 deletion packages/next-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@premieroctet/next-admin",
"version": "2.0.0",
"version": "3.0.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"license": "MIT",
Expand Down

0 comments on commit 216ba52

Please sign in to comment.