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

Possibility to pass props to (default) resolver #6

Open
m4rvr opened this issue Jul 6, 2020 · 0 comments
Open

Possibility to pass props to (default) resolver #6

m4rvr opened this issue Jul 6, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request v2 Issue was created at v2 times and is kept for future v3 improvements.

Comments

@m4rvr
Copy link
Owner

m4rvr commented Jul 6, 2020

Is your feature request related to a problem? Please describe.
At the moment you can only override a resolver but it's not possible to pass props like class to it.
This is especially needed with tailwindcss to add classes to those components.

Describe the solution you'd like
Provide the possibility to define the resolver as an object with the optional component (the component for overriding the default resolver) and props (all props passed directly to the resolver).
It should be still possible to override the resolver directly without an object definition.

Suggestion:

{
  resolvers: {
    blocks: {
      [Block.PARAGRAPH]: {
        component: CustomParagraph,
        props: {
          class: 'custom-classes',
          id: 'custom-id'
        }
      }
    }
  }
}

This should be still possible:

{
  resolvers: {
    blocks: {
      [Block.PARAGRAPH]: CustomParagraph
    }
  }
}
@m4rvr m4rvr self-assigned this Jul 6, 2020
@m4rvr m4rvr added the enhancement New feature or request label Jul 6, 2020
@m4rvr m4rvr added the v2 Issue was created at v2 times and is kept for future v3 improvements. label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2 Issue was created at v2 times and is kept for future v3 improvements.
Projects
None yet
Development

No branches or pull requests

1 participant