File tree 6 files changed +20
-13
lines changed
6 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,17 @@ class App extends React.Component {
29
29
30
30
render ( ) {
31
31
return (
32
- < React . Fragment >
32
+ < >
33
33
< p > Select the countries you have visited using React Tags below:</ p >
34
34
< ReactTags
35
35
tags = { this . state . tags }
36
36
suggestions = { this . state . suggestions }
37
37
onDelete = { this . onDelete . bind ( this ) }
38
- onAddition = { this . onAddition . bind ( this ) } />
38
+ onAddition = { this . onAddition . bind ( this ) }
39
+ />
39
40
< p > Output:</ p >
40
41
< pre > < code > { JSON . stringify ( this . state . tags , null , 2 ) } </ code > </ pre >
41
- </ React . Fragment >
42
+ </ >
42
43
)
43
44
}
44
45
}
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ const plugins = [
19
19
resolve ( ) ,
20
20
// Use CommonJS plugin to include non-ES modules
21
21
commonjs ( )
22
- ] ;
22
+ ]
23
23
24
24
if ( process . env . NODE_ENV === 'production' ) {
25
- // Use Uglify plugin to minify output
26
- plugins . push ( uglify ( ) )
25
+ // Use Uglify plugin to minify output
26
+ plugins . push ( uglify ( ) )
27
27
} else {
28
28
plugins . push ( serve ( { open : true , contentBase : 'example' , port : 8080 } ) )
29
29
}
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ class Input extends React.Component {
80
80
aria-owns = { id }
81
81
aria-activedescendant = { index > - 1 ? `${ id } -${ index } ` : null }
82
82
aria-expanded = { expanded }
83
- style = { { width : this . state . inputWidth } } />
83
+ style = { { width : this . state . inputWidth } }
84
+ />
84
85
< div ref = { this . sizer } style = { SIZER_STYLES } > { query || placeholderText } </ div >
85
86
</ div >
86
87
)
Original file line number Diff line number Diff line change @@ -221,14 +221,16 @@ class ReactTags extends React.Component {
221
221
< div
222
222
className = { this . props . classNames . selected }
223
223
aria-relevant = 'additions removals'
224
- aria-live = 'polite' >
224
+ aria-live = 'polite'
225
+ >
225
226
{ this . props . tags . map ( ( tag , i ) => (
226
227
< TagComponent
227
228
key = { i }
228
229
tag = { tag }
229
230
removeButtonText = { this . props . removeButtonText }
230
231
classNames = { this . props . classNames }
231
- onDelete = { this . deleteTag . bind ( this , i ) } />
232
+ onDelete = { this . deleteTag . bind ( this , i ) }
233
+ />
232
234
) ) }
233
235
</ div >
234
236
< div className = { this . props . classNames . search } >
@@ -241,15 +243,17 @@ class ReactTags extends React.Component {
241
243
inputEventHandlers = { this . inputEventHandlers }
242
244
autoresize = { this . props . autoresize }
243
245
expanded = { expanded }
244
- placeholderText = { this . props . placeholderText } />
246
+ placeholderText = { this . props . placeholderText }
247
+ />
245
248
< Suggestions
246
249
{ ...this . state }
247
250
id = { this . props . id }
248
251
ref = { this . suggestions }
249
252
classNames = { this . props . classNames }
250
253
expanded = { expanded }
251
254
addTag = { this . addTag . bind ( this ) }
252
- suggestionComponent = { this . props . suggestionComponent } />
255
+ suggestionComponent = { this . props . suggestionComponent }
256
+ />
253
257
</ div >
254
258
</ div >
255
259
)
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ class Suggestions extends React.Component {
43
43
role = 'option'
44
44
className = { classNames . join ( ' ' ) }
45
45
aria-disabled = { item . disabled === true }
46
- onMouseDown = { this . onMouseDown . bind ( this , item ) } >
46
+ onMouseDown = { this . onMouseDown . bind ( this , item ) }
47
+ >
47
48
{ item . disableMarkIt ? item . name
48
49
: < SuggestionComponent item = { item } query = { this . props . query } /> }
49
50
</ li >
Original file line number Diff line number Diff line change 9
9
"prepare" : " npm run build" ,
10
10
"prepublish" : " npm run build" ,
11
11
"pretest" : " npm run lint && npm run build" ,
12
- "lint" : " standard ' lib/*.js spec/*.js" ,
12
+ "lint" : " standard lib/*.js spec/*.js" ,
13
13
"test" : " jasmine" ,
14
14
"coverage" : " nyc --include 'dist-es5/**' npm test" ,
15
15
"dev" : " NODE_ENV=development rollup -c example/rollup.config.js --watch" ,
You can’t perform that action at this time.
0 commit comments