Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ochairo authored Mar 29, 2024
1 parent 5f4edd2 commit 8691a57
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,30 @@ You have multiple options for development.
- [Naming conventions](docs/wiki/development-rules/naming_conventions.md)
- [Commit rules](docs/wiki/development-rules/commit_rules.md)
- [Branch strategy](docs/wiki/development-rules/branch_strategy.md)

### Samples

#### Component

How to write components in vanillatte.

```ts
import style from "./sample.component.css";
import template from "./sample.component.html";

class SampleComponent extends BaseComponent {
constructor() {
super();
this._shadowRoot.innerHTML = `<style>${style}</style>${template}`;
}

onInit() {... }

onDestroy() {... }

}

customElements.define("sample-component", SampleComponent);
export default SampleComponent;
```

0 comments on commit 8691a57

Please sign in to comment.