0.0.2 • Published 5 years ago

omtv-react-input v0.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Text input component. Supports theming.

Check component demo.

Install

npm i omtv-react-input

Use

import Input from 'omtv-react-input';

<Input value='some default input' />

Component is not bundled or compiled, It is provided in raw form as is (see component/ folder). The project that is going to use this component should bundle and complie component itself, here are the instructions for webpack and babel:

module.exports = {
  ...
  module: {
    rules: [
      {
        test: /\.js$/,
        include: [
          path.resolve(__dirname, 'src'),
          path.resolve(__dirname, 'node_modules/omtv-react-input'),
        ],
        use: {
          loader: 'babel-loader',
          options: {
            ...
          },
        },
      },
    ],
  },
  ...
};

You can also use omtv-template-react for your project, it's webpack/babel config is compatible with this approach.

Static type checking

Component contains Flow Comment Types that allows either to use flow static typechecking or simply ignore it.

Improve

  1. Install dependencies npm i.
  2. Start webpack dev server for demo project npm run demo.
  3. (optional) Start jest in watch mode npm run jest.
  4. Improve component.
  5. (optional) Publish component demo: npm run publish-demo will try to publish demo create scripts/secret.js file
      module.exports = {
        pwd: '', // leave this field empty if you want script to prompt for password
        host: 'your.host.com', // default port 22, specify other port: 'your.host:222'
      };
    Scripts/secret.js is added to gitignore.
0.0.2

5 years ago

0.0.1

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago