data-field-image
v2.0.0
Published
## API
Downloads
3
Maintainers
Readme
data-field-image
API
createImageField
Create a virtual-dom image data-field for use with data-ui.
Parameters
options
Object options objectoptions.display
Boolean true for display mode, default is false for input mode
Examples
var createImageField = require('data-field-image')
var field = createImageField(options)
var tree = field.render(h, props, 'http://example.com/example.jpg')
createImageField
Render a virtual-dom image data-field.
Parameters
h
function virtual-domh
functionproperties
Object properties object forh
properties.display
Boolean true for display mode, default is false for input modeproperties.value
String any image url
value
String any image url
Examples
var createImageField = require('data-field-image')
var field = createImageField(options)
var tree = field.render(h, props, 'http://example.com/example.jpg')
Installation
npm install data-field-image --save
Or install the data-fields module:
npm install data-fields --save
Tests
npm install
npm test
See also
- data-fields – all data fields packaged together.
- data-ui – a collection of modules for managing data.