Members
(constant) API
Sample Api where the images will be requested
- Source
(constant) COLORS
List of colors
- Source
(constant) POSITION_AND_SIZE
Default position and size
- Source
(constant) createId
Function that creates an id
- Source
(async, constant) get_images
Function that makes a request to the selected api.
- Source
(constant) randomArrayElement
Returns a random element from an array
- Source
(constant) randomNumberBetween
Generates a random number between a range
- Source
Methods
Button(children, onClick, id)
Component that is a basic button
Name | Type | Description |
---|---|---|
children | any | Children of the component |
onClick | function | Function to be executed when clicking on the button. |
id | string | Button id |
- Source
- Basic button component
MoveableComponent(img, color, id, top, left, width, height, error, limitBottom, limitRight)
Component to be resized, which can be a div or an image.
Name | Type | Description |
---|---|---|
img | string | Url of the image to render |
color | string | If the element is a div, it will have a random color. |
id | number | Id of the element to render |
top | number | Position of the top element |
left | number | Poicion of the element left |
width | number | Width of the element to be rendered |
height | number | Height of the element to be rendered |
error | boolean | Indicates if there was an error in the image request |
limitBottom | number | Lower limit to which the element can be displaced |
limitRight | number | Horizontal limit to where the element can be displaced |
- Source
- Component to resize moveable
Spinner()
Component that is a spinner indicating the charge of some element.
- Source
- Spinner component