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

Dropzone not working #878

Open
Rkaede opened this issue Feb 5, 2025 · 0 comments
Open

Dropzone not working #878

Rkaede opened this issue Feb 5, 2025 · 0 comments

Comments

@Rkaede
Copy link

Rkaede commented Feb 5, 2025

Hi there,

First off, Puck is an incredible library. It's really well thought out and has a beautiful API. Thank you so much for putting this out into the world. 🙏

I'm having issues using the DropZone component with our in-house component library. Here's an example codesandbox of the setup:

https://codesandbox.io/p/sandbox/4fpn9f?file=%2Fsrc%2FEditor.tsx

We're trying to nest a two levels deep using the DropZone component: ComponentA > ComponentB > ComponentC.

This works great in the sandbox above. However, when we use our in-house "ComponentB" component, we can no longer drop a "ComponentC" onto it.

import { ComponentB } from '@internal/components';

const config = {
  components: {
    ComponentB: {
      fields: {},
      defaultProps: {},
      render: () => {
        return (
          <ComponentB> // if we change this to a div it works fine.
            <DropZone zone="component-b" />
          </ComponentB>
        );
      },
    },
    //... other components
  },
};

Are there any common pitfalls that we need to check for in our ComponentB?

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

No branches or pull requests

1 participant