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

Export types and interfaces related to DialogProps #381

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

siddharthborderwala
Copy link

@siddharthborderwala siddharthborderwala commented Jun 27, 2024

Issue

When I create a meta object for a storybook story setup in the following way, TS throws an error as it's not able to pick up definitions for WithFade

// components/drawer.tsx
import { Drawer as DrawerPrimitive } from 'vaul'

export type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>
// stories/drawer.stories.tsx
import { Drawer } from '@/components/drawer'

// this throws 2 TS error
const meta = {
  title: 'Drawer',
  component: Drawer
} satisfies Meta<typeof Drawer>

Here's the TS errors

Exported variable 'meta' has or is using name 'WithoutFadeFromProps' from external module
Exported variable 'meta' has or is using name 'WithFadeFromProps' from external module

Fix

Export the WithFadeFromProps and WithoutFadeFromProps TS types.

Copy link

vercel bot commented Jun 27, 2024

@siddharthborderwala is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.

@olafurns7
Copy link

Also seems to happen when using optimizePackageImports in next 14

Type error: Exported variable 'Drawer' has or is using name 'WithFadeFromProps' from external module "/Users/olafurns/Verkefni/dd-unity/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/vaul/dist/index" but cannot be named.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants