feat(custom): custom render prismic type #7
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See updated README and tests for examples.
Custom rendering of prismic type using custom component for prisimc type.
Pass a custom component name to be used to render a prismic type. For example to custom render the 'group-list-item' and 'hyperlink' types
my-list.hbs
my-hyperlink.hbs
Useful Links
Alternatives
Explored using named blocks https://github.com/qonto/ember-prismic-dom/compare/em-custom, it would give a nicer interface, allowing you to declare custom type rendering in the same template as Prismic::Dom is used. However the implementation was going to be very verbose and broken. https://github.com/qonto/ember-prismic-dom/compare/em-custom#diff-0b7a759bb6f26f39ae19fb331cc235b7c6588d834f0204c37e2f350306fa6d33R2 errors
Syntax Error: {{yield}} can only accept a string literal for the
toargument (at ember-prismic-dom/components/prismic/children.hbs on line 2 column 20)
Closes #3