From b1a6a1ae9ce3caa1e5bc680933ed95f2e84c69dc Mon Sep 17 00:00:00 2001 From: WK Wong Date: Tue, 14 May 2024 21:10:17 +0800 Subject: [PATCH 1/2] feat(docs): revise breaking changes content --- apps/docs/content/blog/v2.3.0.mdx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/apps/docs/content/blog/v2.3.0.mdx b/apps/docs/content/blog/v2.3.0.mdx index 1e2d1ca4ef..8178515f9f 100644 --- a/apps/docs/content/blog/v2.3.0.mdx +++ b/apps/docs/content/blog/v2.3.0.mdx @@ -297,6 +297,8 @@ export function Providers({children}: ProvidersProps) { ## Breaking Changes +### Removal of the `units` creation + In order to improve the performance and reduce the bundle size, we have removed the `units` creation from the `nextui` plugin. [TailwindCSS v3.4](https://tailwindcss.com/blog/tailwindcss-v3-4) added support for `min-h-*` and `min-w-*` classes, so it is no longer needed. @@ -335,8 +337,28 @@ export const MyButton = () => { }; ``` -That's it! Your project should now be using the latest version of TailwindCSS and NextUI. +### Separation for `errorMessage` and `isInvalid` + +We are currently working on supporting multiple types of validation, including native HTML constraint validation, custom validation, and real-time validation. +Due to this reason, the requirements for displaying error messages have become more varied, and it is necessary to handle validation conditions separately from the `errorMessage`. + +How to upgrade: + +1. In order to display `errorMessage`, `isInvalid` has to be set to `true`. Therefore, you can add `isInvalid` props and set it to `true`. +```diff-jsx + +``` + +That's it! Your project should now be using the latest version of TailwindCSS and NextUI. From 554673fdda5e6733047b05262653b02c08a50f41 Mon Sep 17 00:00:00 2001 From: WK Wong Date: Tue, 14 May 2024 21:18:19 +0800 Subject: [PATCH 2/2] refactor(docs): revise wordings --- apps/docs/content/blog/v2.3.0.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/content/blog/v2.3.0.mdx b/apps/docs/content/blog/v2.3.0.mdx index 8178515f9f..b8181d10a0 100644 --- a/apps/docs/content/blog/v2.3.0.mdx +++ b/apps/docs/content/blog/v2.3.0.mdx @@ -299,7 +299,7 @@ export function Providers({children}: ProvidersProps) { ### Removal of the `units` creation -In order to improve the performance and reduce the bundle size, we have removed the `units` creation from the +To improve performance and reduce bundle size, we have removed the `units` creation from the `nextui` plugin. [TailwindCSS v3.4](https://tailwindcss.com/blog/tailwindcss-v3-4) added support for `min-h-*` and `min-w-*` classes, so it is no longer needed. How to upgrade: @@ -344,7 +344,7 @@ Due to this reason, the requirements for displaying error messages have become m How to upgrade: -1. In order to display `errorMessage`, `isInvalid` has to be set to `true`. Therefore, you can add `isInvalid` props and set it to `true`. +1. To display `errorMessage`, `isInvalid` must be set to `true`. ```diff-jsx