File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,31 @@ npm i neptunecss-js
19
19
<script src =" https://cdn.jsdelivr.net/npm/neptunecss-js@latest/neptune.min.js" ></script >
20
20
```
21
21
22
- #### Example
22
+ ### Import
23
+
24
+ There are two ways to import Neptune JS. The first way is a namespaced import. Copy the following line into your file.
25
+
26
+ ``` javascript
27
+ import * as NeptuneJS from " path/to/package/neptune.min.js"
28
+ ```
29
+
30
+ Now you have to write NeptuneJS. before every class of Neptune JS like:
31
+
32
+ ``` javascript
33
+ const myBadge = new NeptuneJS.Badge ({
34
+ text: " default badge" ,
35
+ size: " m" ,
36
+ style: " primary"
37
+ });
38
+ ```
39
+
40
+ The second way to import Neptune JS is to import only the components you need.
41
+
42
+ ``` javascript
43
+ import { Badge , Spinner , Toast } from " path/to/package/neptune.min.js"
44
+ ```
45
+
46
+ ### Example
23
47
``` html
24
48
<!DOCTYPE html>
25
49
<html lang =" en" >
You can’t perform that action at this time.
0 commit comments