Skip to content

Commit f9bd5bc

Browse files
committed
hello world
1 parent 8cbabeb commit f9bd5bc

File tree

8 files changed

+94
-22
lines changed

8 files changed

+94
-22
lines changed

examples/demo/README.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
11

2-
[Open fullscreen](/demo/) | [Source on github](https://github.com/activewidgets/react/tree/master/examples/demo) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/react/tree/master/examples/demo)
2+
[Open fullscreen](https://vue.activewidgets.com/demo/) | [Source on github](https://github.com/activewidgets/vue/tree/master/examples/demo) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/vue/tree/master/examples/demo)
33

4-
5-
A minimal example showing ActiveWidgets datagrid for React
6-
7-
```js
8-
import React from "react";
9-
import ReactDOM from "react-dom";
10-
import {Datagrid} from "@activewidgets/react";
11-
import {columns, rows} from "./data.js"
12-
import "./styles.css";
13-
14-
function App() {
15-
return (
16-
<Datagrid columns={columns} rows={rows} />
17-
);
18-
}
19-
20-
const rootElement = document.getElementById("root");
21-
ReactDOM.render(<App />, rootElement);
22-
```
23-
24-
[![Edit react-get-started](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/activewidgets/react/tree/master/examples/get-started)
4+
Vue example

examples/hello-world/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
[Open fullscreen](https://vue.activewidgets.com/hello-world/) | [Source on github](https://github.com/activewidgets/vue/tree/master/examples/hello-world) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/vue/tree/master/examples/hello-world)
3+
4+
Vue example

examples/hello-world/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Hello World - ActiveWidgets/Vue</title>
6+
</head>
7+
<body>
8+
<div id="app">Loading...</div>
9+
<script src="src/main.js"></script>
10+
</body>
11+
</html>

examples/hello-world/package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "vue-hello-world",
3+
"version": "1.0.0",
4+
"description": "Hello World - ActiveWidgets/Vue",
5+
"keywords": [],
6+
"main": "src/main.js",
7+
"scripts": {
8+
"start": "parcel index.html --open",
9+
"build": "parcel build index.html"
10+
},
11+
"dependencies": {
12+
"@activewidgets/vue": "0.0.10",
13+
"vue": "^2"
14+
},
15+
"devDependencies": {
16+
"parcel-bundler": "^1"
17+
},
18+
"private": true
19+
}

examples/hello-world/src/app.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
<template>
3+
<ax-datagrid :rows="rows"></ax-datagrid>
4+
</template>
5+
<script>
6+
7+
import {components} from '@activewidgets/vue';
8+
import './styles.css';
9+
10+
11+
function data(){
12+
return {
13+
rows: [
14+
{ message: 'Hello, World!' }
15+
]
16+
};
17+
}
18+
19+
20+
export default { components, data };
21+
22+
</script>

examples/hello-world/src/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
import Vue from "vue";
3+
import App from "./app.vue";
4+
5+
Vue.config.productionTip = false;
6+
7+
new Vue({
8+
render: h => h(App)
9+
}).$mount('#app');

examples/hello-world/src/styles.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
body {
3+
margin: 60px;
4+
font: 14px/1.2143 'Segoe UI', 'Avenir', 'Helvetica Neue', 'Tahoma', sans-serif;
5+
}
6+
7+
.ax-datagrid {
8+
max-height: 80px;
9+
}
10+
11+
.ax-headers-view {
12+
font-weight: bold;
13+
color: #666;
14+
border-bottom: 1px solid #aaa;
15+
}
16+
17+
.ax-gridlines {
18+
border-bottom: 1px solid #eee;
19+
}

examples/viewer/examples.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11

2+
import hello_world from '../hello-world/README.md';
3+
4+
5+
export const Local = {
6+
'Hello, World!': {path: 'hello-world', readme: hello_world}
7+
};
8+
9+
210
export * from '@activewidgets/datagrid/examples';
311

0 commit comments

Comments
 (0)