File tree Expand file tree Collapse file tree 1 file changed +27
-6
lines changed Expand file tree Collapse file tree 1 file changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,31 @@ From left to right:
24
24
25
25
To get up and running with the library, there are three things you need to include.
26
26
27
- ### 1. The script and styles
27
+ ### 1. Include/Import the library
28
+
29
+ #### 1.1 HTML Script Tag Include
28
30
29
31
Include it as a regular script tag on your page:
30
32
31
33
``` html
32
34
<script src =' dist/onfido.min.js' ></script >
33
35
```
34
36
35
- Or import it as a module into your own JS build system:
37
+ And the CSS styles:
38
+
39
+ ``` html
40
+ <link rel =' stylesheet' href =' dist/styles.css' >
41
+ ```
42
+
43
+ #### Example app
44
+
45
+ [ Here] ( https://jsfiddle.net/4xqtt6fL/3/ )
46
+ you can see a simple example using script tags.
47
+
48
+ #### 1.2 NPM style import
49
+
50
+ You can also import it as a module into your own JS build system.
51
+
36
52
37
53
``` sh
38
54
$ npm install --save onfido-sdk-ui
@@ -46,11 +62,16 @@ import Onfido from 'onfido-sdk-ui'
46
62
var Onfido = require (' onfido-sdk-ui' )
47
63
```
48
64
49
- And finally, the CSS styles:
65
+ The ** CSS style ** will be included ** inline with the JS code ** if the library is imported.
50
66
51
- ``` html
52
- <link rel =' stylesheet' href =' dist/styles.css' >
53
- ```
67
+ #### Notice
68
+
69
+ The library is ** Browser only** , it does not support the ** Node Context** .
70
+
71
+ #### Example App
72
+
73
+ ** [ Here] ( https://github.com/onfido/onfido-sdk-web-sample-app/tree/0.0.1 ) **
74
+ you can see an example app which uses the npm style of import.
54
75
55
76
### 2. Some markup
56
77
You can’t perform that action at this time.
0 commit comments