@aurodesignsystem/auro-button
Advanced tools
Comparing version 7.2.7 to 7.2.8
# Semantic Release Automated Changelog | ||
## [7.2.8](https://github.com/AlaskaAirlines/auro-button/compare/v7.2.7...v7.2.8) (2024-02-20) | ||
### Performance Improvements | ||
* **docs:** add custom registration example to index page ([31a7bd6](https://github.com/AlaskaAirlines/auro-button/commit/31a7bd6de507d5bc6254f4b49b18a94978974d44)) | ||
## [7.2.7](https://github.com/AlaskaAirlines/auro-button/compare/v7.2.6...v7.2.7) (2024-02-14) | ||
@@ -4,0 +11,0 @@ |
@@ -223,1 +223,35 @@ <!-- | ||
</auro-accordion> | ||
## 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-button` 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-button'; | ||
registerComponent('custom-button'); | ||
``` | ||
This will create a new custom element that you can use in your HTML that will function identically to the `<auro-button>` element. | ||
<div class="exampleWrapper exampleWrapper--flex"> | ||
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../apiExamples/custom.html) --> | ||
<!-- The below content is automatically added from ./../../apiExamples/custom.html --> | ||
<custom-button>Primary</custom-button> | ||
<custom-button variant="secondary">Secondary</custom-button> | ||
<custom-button variant="tertiary">Tertiary</custom-button> | ||
<!-- 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-button>Primary</custom-button> | ||
<custom-button variant="secondary">Secondary</custom-button> | ||
<custom-button variant="tertiary">Tertiary</custom-button> | ||
``` | ||
<!-- AURO-GENERATED-CONTENT:END --> | ||
</auro-accordion> |
@@ -396,5 +396,2 @@ /** | ||
// Example custom registration | ||
// registerComponent('my-button'); | ||
export { registerComponent }; |
@@ -14,4 +14,1 @@ import { AuroButton } from './src/auro-button.js'; | ||
} | ||
// Example custom registration | ||
// registerComponent('my-button'); |
@@ -10,3 +10,3 @@ { | ||
"name": "@aurodesignsystem/auro-button", | ||
"version": "7.2.7", | ||
"version": "7.2.8", | ||
"description": "Auro custom auro-button element", | ||
@@ -13,0 +13,0 @@ "author": "Product design and research", |
@@ -122,3 +122,3 @@ <!-- | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.0.8/dist/bundled/essentials.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@7.2.7/dist/auro-button__bundled.js" type="module"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@7.2.8/dist/auro-button__bundled.js" type="module"></script> | ||
``` | ||
@@ -125,0 +125,0 @@ |
155260
940