float
A library for creating user interfaces.
Installation
$ npm install react-ui --save
Example
const Float = ; Float; console;// => <button>Hello Phil</button>
API Documentation
createElement(name, element)
Create a new element.
Parameters:
name
: String_element
: ObjectgetDefaultProps
: Function (Returns Object)render
: Function (Returns String)- this context:
props
: Objectchildren
: String
- this context:
Returns: undefined
Example:
Float;
extendElements(elements)
Add elements to the current Float instance from other Float instances.
Parameters:
elements
: Object
Returns: undefined
Example:
const Float = ;const Float_PS = ; console;// => {HelloButton: {render: function() {...}}} console;// => {break: {render: function() {...}}, CommandButton: {render: function() {...}} Float; console;// => {HelloButton: {render: function() {...}}, break: render: function() {...}, CommandButton: {render: function() {...}}}
getElements()
Parameters: None
Returns: Object
Example:
console;// => {someElement: {render: function() {...}}, someOtherElement: {getDefaultProps: function() {...}, render: function() {...}}
renderElement(html)
Renders an element.
Parameters:
html
: String
Returns: String
Examples:
console;// => <b>hi</b> console;// => <button class="btn btn-primary">Delete</button> console// => <div><h1>Welcome!</h1><button>Hello Phil</button></div>