Skip to content

Commit

Permalink
perf(custom): remove register component example
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjones243 committed Feb 26, 2024
1 parent e65af1b commit 514dd64
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 59 deletions.
31 changes: 0 additions & 31 deletions demo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,4 @@ The auro-avatar element should be used in situations where users may:
<auro-avatar></auro-avatar>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
Having a closing statement about your example helps to really complete the thought with your reader.

## Recommended Use and Version Control

There are two important parts of every Auro component. The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom clement. The class is exported and then used as part of defining the Web Component. When importing this component as described in the <a href="#install">install</a> section, the class is imported and the `auro-avatar` custom element is defined automatically.

To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `registerComponent(name)` method and pass in a unique name.

```js
import './node_modules/@aurodesignsystem/auro-avatar';
registerComponent('custom-avatar');
```

This will create a new custom element that you can use in your HTML that will function identically to the `auro-avatar` element.

<div class="exampleWrapper">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/custom.html) -->
<!-- The below content is automatically added from ./../../apiExamples/custom.html -->
<custom-avatar></custom-avatar>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion alignRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/custom.html) -->
<!-- The below code snippet is automatically added from ./../../apiExamples/custom.html -->

```html
<custom-avatar></custom-avatar>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
28 changes: 0 additions & 28 deletions docs/partials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,3 @@ This file is generated based on a template fetched from `./docs/partials/index.m
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

Having a closing statement about your example helps to really complete the thought with your reader.

## Recommended Use and Version Control

There are two important parts of every Auro component. The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom clement. The class is exported and then used as part of defining the Web Component. When importing this component as described in the <a href="#install">install</a> section, the class is imported and the `auro-avatar` custom element is defined automatically.

To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `registerComponent(name)` method and pass in a unique name.

```js
import './node_modules/@aurodesignsystem/auro-avatar';
registerComponent('custom-avatar');
```

This will create a new custom element that you can use in your HTML that will function identically to the `auro-avatar` element.

<div class="exampleWrapper">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/custom.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</div>

<auro-accordion alignRight>
<span slot="trigger">See code</span>

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../../apiExamples/custom.html) -->
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>

0 comments on commit 514dd64

Please sign in to comment.