Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadcn React 19 #1243

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
cleanup
ahkhanjani committed Nov 15, 2024
commit 31f5fb4b34d13c43e644a2c23e9201720533b648
3 changes: 2 additions & 1 deletion packages/ui/src/button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { VariantProps } from "class-variance-authority";
import type { ComponentProps } from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva } from "class-variance-authority";

@@ -35,7 +36,7 @@ const buttonVariants = cva(
);

interface ButtonProps
extends React.ComponentProps<"button">,
extends ComponentProps<"button">,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}

Unchanged files with check annotations Beta

function useFormField() {
const { getFieldState, formState } = useFormContext();
const fieldContext = use(FormFieldContext);

Check failure on line 66 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe assignment of an error typed value

Check failure on line 66 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe call of a(n) `error` type typed value
if (!fieldContext) {
throw new Error("useFormField should be used within <FormField>");
}
const fieldState = getFieldState(fieldContext.name, formState);

Check failure on line 70 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe member access .name on an `error` typed value
const itemContext = use(FormItemContext);

Check failure on line 72 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe assignment of an error typed value

Check failure on line 72 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe call of a(n) `error` type typed value
const { id } = itemContext;

Check failure on line 73 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe assignment of an error typed value
return {
id,

Check failure on line 76 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe assignment of an error typed value
name: fieldContext.name,

Check failure on line 77 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe assignment of an error typed value

Check failure on line 77 in packages/ui/src/form.tsx

GitHub Actions / lint

Unsafe member access .name on an `error` typed value
formItemId: `${id}-form-item`,
formDescriptionId: `${id}-form-item-description`,
formMessageId: `${id}-form-item-message`,