Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekKrol committed Jun 30, 2024
1 parent d01be63 commit 76ce5e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Zod To Fields
<h1 align="center">
Zod To Fields
</h1>
<p align="center">
<img src="zod-to-fields.svg" alt="Logo" height="300" />
</p>

> **<p align="center">
> Automate your form field generation with type safety.
Expand Down Expand Up @@ -76,7 +81,7 @@ Ensure you have the power of Zod To Fields in your project by installing it via

```bash
# With npm
npm install zod-to-fields --save
npm install zod-to-fields

# With Yarn
yarn add zod-to-fields
Expand Down Expand Up @@ -200,7 +205,7 @@ withFieldOptions({

#### Type Behavior

- `z.string()` will generate field options of type `InputStringFieldOptions`, which is narrowed to allow string types like `text`, `password`, etc. You can override these settings with any other property which is a subset of `Partial<HTMLInputElement>`.
- `z.string()` will generate field options of type `InputStringFieldOptions`, which is narrowed to allow string types like `text`, `password`, etc. You can override these settings with any other property which is a subset of `Partial<InputHTMLAttributes<HTMLInputElement>>`.

- `z.enum()` and `z.nativeEnum()` will generate field options of type `InputEnumFieldOptions`, allowing you to specify options either as a select dropdown or as radio buttons.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zod-to-fields",
"version": "0.1.37",
"version": "0.1.38",
"description": "Turn your Zod schemas into configurable field arrays for easy integration with HTML, React, Vue, and more.",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
Expand Down Expand Up @@ -50,7 +50,7 @@
"zod": "^3.0.0"
},
"scripts": {
"dev:react": "pnpm --filter react dev",
"dev:react": "pnpm --filter react-example dev",
"preinstall": "npx only-allow pnpm",
"prepare": "husky install",
"build": "tsc --project tsconfig.cjs.json && tsc-alias --project tsconfig.cjs.json && tsc --project tsconfig.esm.json && tsc-alias --project tsconfig.esm.json && echo 'Build complete'",
Expand Down
1 change: 1 addition & 0 deletions zod-to-fields.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 76ce5e5

Please sign in to comment.