Skip to content

Commit 8ead9e8

Browse files
committed
♻️ Minor fixes, docs
1 parent 811967a commit 8ead9e8

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
node_modules
22
/lib
3-
demo
3+
/demo
44

55
# Editor config
66
.vscode

src/docs/index.html renamed to src/demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<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>
1010

1111
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
1212
<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.

src/lib/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ type State = {
2626
otp: string[],
2727
};
2828

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
2933
const isStyleObject = obj => typeof obj === 'object';
3034

3135
class SingleOtpInput extends PureComponent<*> {

webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const path = require('path');
22
const HtmlWebpackPlugin = require('html-webpack-plugin');
33

44
module.exports = {
5-
entry: path.join(__dirname, 'src/docs'),
5+
entry: path.join(__dirname, 'src/demo'),
66
output: {
77
path: path.join(__dirname, 'demo'),
88
filename: 'bundle.js',
@@ -22,14 +22,14 @@ module.exports = {
2222
},
2323
plugins: [
2424
new HtmlWebpackPlugin({
25-
template: path.join(__dirname, 'src/docs/index.html'),
25+
template: path.join(__dirname, 'src/demo/index.html'),
2626
}),
2727
],
2828
resolve: {
2929
extensions: ['.js', '.jsx'],
3030
},
3131
devServer: {
32-
contentBase: path.join(__dirname, 'docs'),
32+
contentBase: path.join(__dirname, 'demo'),
3333
port: 8000,
3434
stats: 'minimal',
3535
},

0 commit comments

Comments
 (0)