Customization
The Iframes can be customized by providing your own css file, but if that's not enough, all the Iframes have a common set of customization methods:
Css classes
addClass(id: string, className: string)
Adds the given class to the element selected by the provided id.
Parameters:
- id: The id of the element
- className: The name of the class to be added to the element
getClasses(id: string)
Returns the css classes of the element selected by the provided id.
Parameters:
- id: The id of the element
removeClass(id: string, className: string)
Removes the given class to the element selected by the provided id.
Parameters:
- id: The id of the element
- className: The name of the class to be removed from the element
Events
onEnter(callback: (targetId: string) => void)
Adds the provided callback function the list of callbacks called when the user presses enter in one of the input fields.
Parameters:
- callback: The event handler, expecting a type and a targetId parameter
onFocus(callback: (targetId: string) => void)
Adds the provided callback function the list of callbacks called when one of the inputs gains focus.
Parameters:
- callback: The event handler, expecting a type and a targetId parameter
onBlur(callback: (targetId: string) => void)
Adds the provided callback function the list of callbacks called when one of the inputs loses focus.
Parameters:
- callback: The event handler, expecting a type and a targetId parameter
Placeholders
setPlaceholder(id: string, placeholder: string)
Sets the placeholder of the input selected by the provided id.
Paramaterers:
- id: The id of the element
- placeholder: The placeholder to be set to the element