1.3.0 • Published 4 years ago
saytum-fast-clear v1.3.0
Saytum fast clear
Using
Install the library
$ yarn add saytum-fast-clear
Import the library and create an instance with settings
import SaytumFastClear from 'saytum-fast-clear';
new SaytumFastClear({
targetElements: 'input[type="text"], input[type="search"], input[type="email"]',
classFastClear: 'fast-clear',
titleFastClear: 'Clear input',
customClick: () => {
alert('customClick');
},
classIgnore: 'not-fast-clear',
focusAfterCleaning: true
});
Add styles and image (close.svg).
An element for quick cleaning will be added to all input fields.