shadcn-ui-react 0.3.8 → 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 CHANGED
@@ -37,7 +37,9 @@ export default function App() {
37
37
  return (
38
38
  <div className="p-4">
39
39
  <Button variant="default">Click me</Button>
40
- <Button loading className="ml-2">Loading</Button>
40
+ <Button loading className="ml-2">
41
+ Loading
42
+ </Button>
41
43
  </div>
42
44
  );
43
45
  }
@@ -174,10 +176,14 @@ import {
174
176
  import * as z from "zod";
175
177
 
176
178
  const formSchema = z.object({
177
- email: z.string({error: "Email is required"}).email({ message: "Enter a valid email address" }),
179
+ email: z.email({
180
+ pattern: z.regexes.email,
181
+ error: 'Email is required'
182
+ }),
178
183
  password: z
179
184
  .string()
180
185
  .min(8, { message: "Password must be at least 8 characters" }),
186
+ gender: z.enum(['male', 'female']).optional().nullable(),
181
187
  });
182
188
 
183
189
  type UserFormValue = z.infer<typeof formSchema>;
@@ -201,6 +207,28 @@ export default function UserAuthForm() {
201
207
  type="email"
202
208
  placeholder="Enter your email"
203
209
  label="Email"
210
+ variant="outline" //outline | soft | ghost | filled | flushed | unstyled | link
211
+ className="" //your style
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
+ />
222
+ <FormSelect
223
+ control={form.control}
224
+ name="gender"
225
+ label="Gender"
226
+ variant="outline" //outline | soft | ghost | filled | flushed | unstyled | link
227
+ className="" //your style
228
+ items={[
229
+ { label: "Male", value: "male" },
230
+ { label: "Female", value: "female" },
231
+ ]}
204
232
  />
205
233
  <Button className="ml-auto w-full" type="submit">
206
234
  Log In
@@ -290,7 +318,6 @@ const Example = () => {
290
318
  export default Example;
291
319
  ```
292
320
 
293
-
294
321
  ---
295
322
 
296
323
  ## 💅 Theming & Styling