Package Exports
- custom-input-npm
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (custom-input-npm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
What is this?
Create input with cross button by id.
Installation
npm i custom-npm-input --save
Usage
import { inputWithCross } from 'custom-npm-input';
inputWithCross({
id: 'input',
inputStyles: {
backgroundColor: 'red'
},
parentId: 'root',
onClick: () => {},
onFocus: () => {},
onBlur: () => {},
onChange: () => {},
onEnter: () => {},
});To change cross button style pass in props crossStyle obj.
import { inputWithCross } from 'custom-npm-input';
inputWithCross({
id: 'input',
crossStyle: {
lineStyle: '1px solid red',
height: '12px',
positionRight: '10px',
positionTop: '20%',
},
parentId: 'root',
});Options
- id - string (without #),
- parentId - string (without #),
- inputStyles- object with styles for input,
- crossStyle- object with styles for cross button,
crossStyle properties: lineStyle, height, positionRight, positionTop, all should be strings.
- onClick - function,
- onFocus - function,
- onBlur - function,
- onChange - function,
- onEnter - function,