File tree Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
node_modules
2
2
/lib
3
- demo
3
+ / demo
4
4
5
5
# Editor config
6
6
.vscode
Original file line number Diff line number Diff line change 5
5
< meta charset ="UTF-8 ">
6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
7
< meta http-equiv ="X-UA-Compatible " content ="ie=edge ">
8
- < meta name ="description " content ="CHANGE THIS ">
9
- < title > React component starter </ title >
8
+ < meta name ="description " content ="React Component for handling OTP inputs ">
9
+ < title > react-otp-input </ title >
10
10
11
11
< link href ="https://fonts.googleapis.com/css?family=Lato " rel ="stylesheet ">
12
12
< link href ="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css " rel ="stylesheet ">
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ type State = {
26
26
otp : string [ ] ,
27
27
} ;
28
28
29
+ // Doesn't really check if it's a style Object
30
+ // Basic implemenetation to check if it's not a string
31
+ // of classNames and is an Object
32
+ // TODO: Better implementation
29
33
const isStyleObject = obj => typeof obj === 'object' ;
30
34
31
35
class SingleOtpInput extends PureComponent < * > {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const path = require('path');
2
2
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
3
3
4
4
module . exports = {
5
- entry : path . join ( __dirname , 'src/docs ' ) ,
5
+ entry : path . join ( __dirname , 'src/demo ' ) ,
6
6
output : {
7
7
path : path . join ( __dirname , 'demo' ) ,
8
8
filename : 'bundle.js' ,
@@ -22,14 +22,14 @@ module.exports = {
22
22
} ,
23
23
plugins : [
24
24
new HtmlWebpackPlugin ( {
25
- template : path . join ( __dirname , 'src/docs /index.html' ) ,
25
+ template : path . join ( __dirname , 'src/demo /index.html' ) ,
26
26
} ) ,
27
27
] ,
28
28
resolve : {
29
29
extensions : [ '.js' , '.jsx' ] ,
30
30
} ,
31
31
devServer : {
32
- contentBase : path . join ( __dirname , 'docs ' ) ,
32
+ contentBase : path . join ( __dirname , 'demo ' ) ,
33
33
port : 8000 ,
34
34
stats : 'minimal' ,
35
35
} ,
You can’t perform that action at this time.
0 commit comments