Skip to content

Commit 35e0d25

Browse files
initial version
Signed-off-by: Phillip Kruger <phillip.kruger@gmail.com>
1 parent f6bc0ce commit 35e0d25

File tree

7 files changed

+6506
-1
lines changed

7 files changed

+6506
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,51 @@
11
# qui-dot
2-
Render dot files
2+
A Lit-based web component to show dot files
3+
4+
## Installation
5+
6+
```bash
7+
npm i @qomponent/qui-dot
8+
```
9+
10+
## Usage
11+
12+
```javascript
13+
14+
15+
import { LitElement, html, css } from 'lit';
16+
import '@qomponent/qui-dot';
17+
18+
class MyMainComponent extends LitElement {
19+
20+
constructor() {
21+
super();
22+
}
23+
24+
render() {
25+
return html`<qui-dot dot="digraph { Hello -> World }"></qui-dot>
26+
`;
27+
}
28+
}
29+
30+
customElements.define('my-main-component', MyMainComponent);
31+
32+
33+
```
34+
35+
## Example
36+
37+
To run the example:
38+
39+
```bash
40+
npm install
41+
npm start
42+
```
43+
44+
## Contributing
45+
46+
Pull requests are welcome. For major changes, please open an issue first
47+
to discuss what you would like to change.
48+
49+
## License
50+
51+
[Apache 2](http://www.apache.org/licenses/LICENSE-2.0)

example/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Dot Web Component Demo</title>
7+
<script type="module" src="./qui-dot.js"></script>
8+
<style>
9+
10+
</style>
11+
</head>
12+
<body>
13+
<h1>Dot</h1>
14+
15+
<!-- Use the directory tree component -->
16+
<qui-dot dot='digraph { Hello -> World }'></qui-dot>
17+
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)