Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade docz * Set dark theme * Add resource loader usage * Move to Docsify
- Loading branch information
1 parent
f71e8ed
commit ff8c719
Showing
16 changed files
with
4,287 additions
and
22,334 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Biotope Element | ||
|
||
## Installation | ||
You can install the biotope element in your project using npm | ||
```bash | ||
npm install @biotope/element --save | ||
``` | ||
or yarn | ||
```bash | ||
yarn add @biotope/element --save | ||
``` | ||
<br/> | ||
After that to use it, import it in your project: | ||
|
||
```js | ||
import Element from '@biotope/element'; | ||
``` | ||
|
||
## Usage | ||
|
||
To use the biotope element, you have to extend it with your custom class: | ||
|
||
```js | ||
import Element from '@biotope/element'; | ||
|
||
export class MyButton extends Element { | ||
public static componentName = 'my-button'; | ||
|
||
public render() { | ||
return this.html`Hello World`; | ||
} | ||
} | ||
``` | ||
|
||
After defining your class which you can do using existing methods (link) you have to call `register` on the class itself to use it in the html: | ||
index.js | ||
```js | ||
import Element from '@biotope/element'; | ||
|
||
export class MyButton extends Element { | ||
public static componentName = 'my-button'; | ||
|
||
public render() { | ||
return this.html`Hello World 🐤`; | ||
} | ||
} | ||
|
||
MyButton.register(); | ||
``` | ||
|
||
After that you can use it in your html like that: | ||
index.html | ||
```html | ||
<script src="index.js"></script> | ||
<my-button></my-button> | ||
``` | ||
|
||
This will result inthe following html: | ||
```html | ||
<my-button> | ||
Hello world 🐤 | ||
</my-button> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- __Getting started__ | ||
- [Quick Start](quick-start.md) | ||
- [Component](component.md) | ||
- [Styling](styling.md) | ||
- [__Advanced__](advanced.md) | ||
- [__Used with__](used-with.md) | ||
- [__Migration__](migration.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
--- | ||
name: 2 Advanced Guides | ||
route: '/advanced' | ||
order: 3 | ||
--- | ||
|
||
# Advanced | ||
|
||
## Handeling state | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>@biotope/element - Biotope Element</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta name="description" content="Biotope Element"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script> | ||
window.$docsify = { | ||
name: '@biotope/element', | ||
repo: 'https://github.com/biotope/biotope-element', | ||
loadSidebar: true, | ||
subMaxLevel: 2, | ||
auto2top: true, | ||
search: 'auto' | ||
} | ||
</script> | ||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script> | ||
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.