File tree 5 files changed +11
-3
lines changed
5 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ npm install --save react-filetree
11
11
12
12
## Usage
13
13
14
+ ![ Example]
15
+ (assets/example.gif)
16
+
14
17
### data.js
15
18
```
16
19
const action = (event) => {
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import { FileTree } from '../src/FileTree';
6
6
7
7
// Sample Data
8
8
const action = ( event ) => {
9
- console . log ( 'action' , event )
9
+ const file = event . name ;
10
+ alert ( `action: ${ file } ` ) ;
10
11
}
11
12
12
13
const sampleData = [
Original file line number Diff line number Diff line change @@ -20,14 +20,16 @@ const options = {
20
20
} , {
21
21
test : / \. ( j p g | p n g | g i f ) $ / ,
22
22
loader : 'file-loader' ,
23
+ exclude : '/assets/example.gif' ,
23
24
} , {
24
25
test : / \. ( j p g | p n g | g i f ) $ / ,
25
26
loader : 'image-webpack-loader' ,
26
27
query : {
27
28
optipng : {
28
29
optimizationLevel : 7 ,
29
30
} ,
30
- }
31
+ } ,
32
+ exclude : '/assets/example.gif' ,
31
33
} ,
32
34
]
33
35
} ,
Original file line number Diff line number Diff line change @@ -21,14 +21,16 @@ const options = {
21
21
} , {
22
22
test : / \. ( j p g | p n g | g i f ) $ / ,
23
23
loader : 'file-loader' ,
24
+ exclude : '/assets/example.gif' ,
24
25
} , {
25
26
test : / \. ( j p g | p n g | g i f ) $ / ,
26
27
loader : 'image-webpack-loader' ,
27
28
query : {
28
29
optipng : {
29
30
optimizationLevel : 7 ,
30
31
} ,
31
- }
32
+ } ,
33
+ exclude : '/assets/example.gif' ,
32
34
} ,
33
35
]
34
36
} ,
You can’t perform that action at this time.
0 commit comments