Skip to content

Commit b8af833

Browse files
fix: Add missing imports in story files
- Add missing Form import from react-router in multiple story files - Add missing FormMessage import in checkbox-list.stories.tsx - Add missing RadioGroupItem and RadioOption imports in radio-group.stories.tsx - Change type-only imports to component imports for FormLabel and FormMessage - Fix import issues that were causing 'X is not defined' errors in tests Fixes 5 out of 6 failing tests. Remaining test failure is a test logic issue, not an import issue.
1 parent 582bf4a commit b8af833

7 files changed

Lines changed: 12 additions & 9 deletions

apps/docs/src/remix-hook-form/checkbox-list.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { zodResolver } from '@hookform/resolvers/zod';
22
import { Checkbox } from '@lambdacurry/forms/remix-hook-form/checkbox';
3+
import { FormMessage } from '@lambdacurry/forms/remix-hook-form/form';
34
import { Button } from '@lambdacurry/forms/ui/button';
45
import type { Meta, StoryObj } from '@storybook/react-vite';
56
import { expect, userEvent, within } from '@storybook/test';
6-
import { type ActionFunctionArgs, useFetcher } from 'react-router';
7+
import { type ActionFunctionArgs, Form, useFetcher } from 'react-router';
78
import { RemixFormProvider, getValidatedFormData, useRemixForm } from 'remix-hook-form';
89
import { z } from 'zod';
910
import { withReactRouterStubDecorator } from '../lib/storybook/react-router-stub';

apps/docs/src/remix-hook-form/dropdown-menu-select.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Button } from '@lambdacurry/forms/ui/button';
44
import { DropdownMenuSelectItem } from '@lambdacurry/forms/ui/dropdown-menu-select-field';
55
import type { Meta, StoryObj } from '@storybook/react-vite';
66
import { expect, screen, userEvent, within } from '@storybook/test';
7-
import { type ActionFunctionArgs, useFetcher } from 'react-router';
7+
import { type ActionFunctionArgs, Form, useFetcher } from 'react-router';
88
import { RemixFormProvider, createFormData, getValidatedFormData, useRemixForm } from 'remix-hook-form';
99
import { z } from 'zod';
1010
import { withReactRouterStubDecorator } from '../lib/storybook/react-router-stub';

apps/docs/src/remix-hook-form/otp-input.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { OTPInput } from '@lambdacurry/forms/remix-hook-form/otp-input';
33
import { Button } from '@lambdacurry/forms/ui/button';
44
import type { Meta, StoryObj } from '@storybook/react-vite';
55
import { expect, userEvent, within } from '@storybook/test';
6-
import { type ActionFunctionArgs, useFetcher } from 'react-router';
6+
import { type ActionFunctionArgs, Form, useFetcher } from 'react-router';
77
import { RemixFormProvider, createFormData, getValidatedFormData, useRemixForm } from 'remix-hook-form';
88
import { z } from 'zod';
99
import { withReactRouterStubDecorator } from '../lib/storybook/react-router-stub';

apps/docs/src/remix-hook-form/radio-group-custom.stories.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { zodResolver } from '@hookform/resolvers/zod';
22
import { RadioGroup, type RadioOption } from '@lambdacurry/forms/remix-hook-form/radio-group';
33
import { RadioGroupItem } from '@lambdacurry/forms/remix-hook-form/radio-group-item';
4-
import type { FormLabel, FormMessage } from '@lambdacurry/forms/remix-hook-form/form';
4+
import { FormLabel, FormMessage } from '@lambdacurry/forms/remix-hook-form/form';
55
import { Button } from '@lambdacurry/forms/ui/button';
66
import { Label } from '@lambdacurry/forms/ui/label';
7+
import { cn } from '@lambdacurry/forms/ui/utils';
78
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
89
import type { Meta, StoryObj } from '@storybook/react-vite';
910
import { expect, userEvent, within } from '@storybook/test';
1011
import type { ComponentPropsWithoutRef, ComponentType } from 'react';
11-
import { type ActionFunctionArgs, useFetcher } from 'react-router';
12+
import { type ActionFunctionArgs, Form, useFetcher } from 'react-router';
1213
import { RemixFormProvider, getValidatedFormData, useRemixForm } from 'remix-hook-form';
1314
import { z } from 'zod';
1415
import { withReactRouterStubDecorator } from '../lib/storybook/react-router-stub';

apps/docs/src/remix-hook-form/radio-group.stories.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { zodResolver } from '@hookform/resolvers/zod';
2-
import { RadioGroup } from '@lambdacurry/forms/remix-hook-form/radio-group';
2+
import { RadioGroup, type RadioOption } from '@lambdacurry/forms/remix-hook-form/radio-group';
3+
import { RadioGroupItem } from '@lambdacurry/forms/remix-hook-form/radio-group-item';
34
import { Button } from '@lambdacurry/forms/ui/button';
45
import type { Meta, StoryObj } from '@storybook/react-vite';
56
import { expect, userEvent, within } from '@storybook/test';
6-
import { type ActionFunctionArgs, useFetcher } from 'react-router';
7+
import { type ActionFunctionArgs, Form, useFetcher } from 'react-router';
78
import { RemixFormProvider, createFormData, getValidatedFormData, useRemixForm } from 'remix-hook-form';
89
import { z } from 'zod';
910
import { withReactRouterStubDecorator } from '../lib/storybook/react-router-stub';

apps/docs/src/remix-hook-form/switch.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Switch } from '@lambdacurry/forms/remix-hook-form/switch';
33
import { Button } from '@lambdacurry/forms/ui/button';
44
import type { Meta, StoryObj } from '@storybook/react-vite';
55
import { expect, userEvent, within } from '@storybook/test';
6-
import { type ActionFunctionArgs, useFetcher } from 'react-router';
6+
import { type ActionFunctionArgs, Form, useFetcher } from 'react-router';
77
import { RemixFormProvider, createFormData, getValidatedFormData, useRemixForm } from 'remix-hook-form';
88
import { z } from 'zod';
99
import { withReactRouterStubDecorator } from '../lib/storybook/react-router-stub';

apps/docs/src/remix-hook-form/text-field-custom.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { zodResolver } from '@hookform/resolvers/zod';
22
import { TextField } from '@lambdacurry/forms/remix-hook-form/text-field';
3-
import type { FormLabel, FormMessage } from '@lambdacurry/forms/remix-hook-form/form';
3+
import { FormLabel, FormMessage } from '@lambdacurry/forms/remix-hook-form/form';
44
import { Button } from '@lambdacurry/forms/ui/button';
55
import { Input } from '@lambdacurry/forms/ui/input';
66
import type { Meta, StoryObj } from '@storybook/react-vite';

0 commit comments

Comments
 (0)