docfy icon indicating copy to clipboard operation
docfy copied to clipboard

preview-component appears to not exist / there is no way to render only with JS

Open NullVoxPopuli opened this issue 2 years ago • 1 comments

for example, I wanted this:


```js preview-component
import Title from 'my-library';
import Component from '@glimmer/component';
import { hbs } from 'ember-cli-htmlbars';
import { setComponentTemplate } from '@ember/component';

export default setComponentTemplate(
  hbs`<this.Title />`,
  class extends Component {
    Title = Title;
  },
);
```

But it only renders the code, and doesn't actually invoke <Title />

NullVoxPopuli avatar Nov 15 '21 19:11 NullVoxPopuli

a reason I want/need this behavior, is because I'd like to be able to have addons provide example components that hack at internal data structures for documentation / demonstration purposes (esp w/r/t design) -- rendering parts of a component is not an option, because those parts are not public API)

NullVoxPopuli avatar Nov 15 '21 20:11 NullVoxPopuli