shadcn-ui-react 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,12 +176,14 @@ import {
|
|
|
176
176
|
import * as z from "zod";
|
|
177
177
|
|
|
178
178
|
const formSchema = z.object({
|
|
179
|
-
email: z
|
|
180
|
-
.
|
|
181
|
-
|
|
179
|
+
email: z.email({
|
|
180
|
+
pattern: z.regexes.email,
|
|
181
|
+
error: 'Email is required'
|
|
182
|
+
}),
|
|
182
183
|
password: z
|
|
183
184
|
.string()
|
|
184
185
|
.min(8, { message: "Password must be at least 8 characters" }),
|
|
186
|
+
gender: z.enum(['male', 'female']).optional().nullable(),
|
|
185
187
|
});
|
|
186
188
|
|
|
187
189
|
type UserFormValue = z.infer<typeof formSchema>;
|
|
@@ -208,6 +210,15 @@ export default function UserAuthForm() {
|
|
|
208
210
|
variant="outline" //outline | soft | ghost | filled | flushed | unstyled | link
|
|
209
211
|
className="" //your style
|
|
210
212
|
/>
|
|
213
|
+
<FormField
|
|
214
|
+
control={form.control}
|
|
215
|
+
name="password"
|
|
216
|
+
type="password"
|
|
217
|
+
placeholder="Enter password"
|
|
218
|
+
label="Password"
|
|
219
|
+
variant="outline" //outline | soft | ghost | filled | flushed | unstyled | link
|
|
220
|
+
className="" //your style
|
|
221
|
+
/>
|
|
211
222
|
<FormSelect
|
|
212
223
|
control={form.control}
|
|
213
224
|
name="gender"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-ui-react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Bleker Cordova <bleker@gliyen.com>",
|
|
6
6
|
"description": "A collection of components for building beautiful and accessible user interfaces with React and Tailwind CSS.",
|