ui: Add new component blueprint (#12421)

This adds a new component blueprint for all our components. We've been
using README.mdx files for quite some time to document our components
for other engineers. This adds a default file to help new engineers get
started writing useful documentation. These README.mdx file are also
very useful for building out components in isolation from scratch and
and some point will be used to run automated component testing.
This commit is contained in:
John Cowen 2022-02-25 09:47:20 +00:00 committed by GitHub
parent b95f010ac0
commit 79a07c7a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,67 @@
<!-- START component-docs:@tagName -->
# <%= classifiedModuleName %>
<!-- END component-docs:@tagName -->
```hbs preview-template
<figure>
<figcaption>
Provide a widget for controlling things
</figcaption>
<select
onchange={{action (mut this.type) value="target.value"}}
>
<option>type-1</option>
</select>
</figure>
<figure>
<figcaption>
Provide a some data and use the component
</figcaption>
<DataSource
@src={{uri '/partition/namespace/dc-1/services'}}
as |source|>
<<%= classifiedModuleName %>
>
</<%= classifiedModuleName %>>
</DataSource>
</figure>
```
## Attributes
<!-- START component-docs:@attrs -->
<!-- END component-docs:@attrs -->
## Arguments
<!-- START component-docs:@args -->
<!-- END component-docs:@args -->
## Slots
<!-- START component-docs:@slots -->
<!-- END component-docs:@slots -->
## CSS Parts
<!-- START component-docs:@cssparts -->
<!-- END component-docs:@cssparts -->
## CSS Properties
<!-- START component-docs:@cssprops -->
<!-- END component-docs:@cssprops -->
## Contextual Components
<!-- START component-docs:@components -->
<!-- END component-docs:@components -->

View File

@ -0,0 +1,4 @@
module.exports = Object.assign(
require('ember-source/blueprints/component/index.js')
);