From 79a07c7a3d7e203d43656bbcf54f605563e37eaf Mon Sep 17 00:00:00 2001 From: John Cowen Date: Fri, 25 Feb 2022 09:47:20 +0000 Subject: [PATCH] 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. --- .../__root__/__templatepath__/README.mdx | 67 +++++++++++++++++++ .../__templatepath__/__templatename__.hbs | 1 + .../consul-ui/blueprints/component/index.js | 4 ++ 3 files changed, 72 insertions(+) create mode 100644 ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/README.mdx create mode 100644 ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/__templatename__.hbs create mode 100644 ui/packages/consul-ui/blueprints/component/index.js diff --git a/ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/README.mdx b/ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/README.mdx new file mode 100644 index 0000000000..5b0649073a --- /dev/null +++ b/ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/README.mdx @@ -0,0 +1,67 @@ + +# <%= classifiedModuleName %> + + +```hbs preview-template +
+ +
+ Provide a widget for controlling things +
+ + +
+ +
+ +
+ Provide a some data and use the component +
+ + + + <<%= classifiedModuleName %> + + > + > + + + +
+``` + +## Attributes + + + + +## Arguments + + + + +## Slots + + + + +## CSS Parts + + + + +## CSS Properties + + + + +## Contextual Components + + + diff --git a/ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/__templatename__.hbs b/ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/__templatename__.hbs new file mode 100644 index 0000000000..889d9eeadc --- /dev/null +++ b/ui/packages/consul-ui/blueprints/component/files/__root__/__templatepath__/__templatename__.hbs @@ -0,0 +1 @@ +{{yield}} diff --git a/ui/packages/consul-ui/blueprints/component/index.js b/ui/packages/consul-ui/blueprints/component/index.js new file mode 100644 index 0000000000..bc164e8481 --- /dev/null +++ b/ui/packages/consul-ui/blueprints/component/index.js @@ -0,0 +1,4 @@ +module.exports = Object.assign( + require('ember-source/blueprints/component/index.js') +); +