Skip to content

Commit 84fd7c2

Browse files
committed
hello world
1 parent f9b6108 commit 84fd7c2

File tree

7 files changed

+77
-22
lines changed

7 files changed

+77
-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://jquery.activewidgets.com/demo/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/demo) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/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+
jQuery 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://jquery.activewidgets.com/hello-world/) | [Source on github](https://github.com/activewidgets/jquery/tree/master/examples/hello-world) | [Edit on Codesandbox](https://codesandbox.io/s/github/activewidgets/jquery/tree/master/examples/hello-world)
3+
4+
jQuery 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/jQuery</title>
6+
</head>
7+
<body>
8+
<ax-datagrid>Loading...</ax-datagrid>
9+
<script src="src/index.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": "jquery-hello-world",
3+
"version": "1.0.0",
4+
"description": "Hello World - ActiveWidgets/jQuery",
5+
"keywords": [],
6+
"main": "src/index.js",
7+
"scripts": {
8+
"start": "parcel index.html --open",
9+
"build": "parcel build index.html"
10+
},
11+
"dependencies": {
12+
"@activewidgets/jquery": "0.0.10",
13+
"jquery": "*"
14+
},
15+
"devDependencies": {
16+
"parcel-bundler": "^1"
17+
},
18+
"private": true
19+
}

examples/hello-world/src/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
import $ from 'jquery';
3+
import '@activewidgets/jquery';
4+
import './styles.css';
5+
6+
7+
const rows = [
8+
{ message: 'Hello, World!' }
9+
];
10+
11+
12+
$('ax-datagrid')
13+
.prop('rows', rows)
14+
.mount();
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)