ywana-core8 0.0.913 → 0.0.914

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.913",
3
+ "version": "0.0.914",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { CheckBox, ColorField, DateRange, DropDown, TextField, TokenField } from '../html'
2
+ import { CheckBox, ColorField, DateRange, DropDown, TextField, TokenField, TextArea } from '../html'
3
3
  import { FORMATS } from './FORMATS'
4
4
  import { TYPES } from './TYPES'
5
5
  import './DynamicForm.css'
@@ -52,6 +52,12 @@ const DynamicFormField = (props) => {
52
52
  const label = required ? `${field.label} *` : field.label
53
53
 
54
54
  switch (format) {
55
+ case FORMATS.NUMBER:
56
+ return <TextField id={id} label={label} type="number" value={value} onChange={change} outlined />
57
+ case FORMATS.BOOLEAN:
58
+ return <CheckBox id={id} label={label} value={value} onChange={change} />
59
+ case FORMATS.TEXT:
60
+ return <TextArea id={id} label={label} value={value} onChange={change} outlined />
55
61
  case FORMATS.DATE:
56
62
  return <TextField id={id} label={label} type="date" value={value} onChange={change} outlined />
57
63
  case FORMATS.TIME:
@@ -3,6 +3,9 @@
3
3
  */
4
4
  export const FORMATS = {
5
5
  NONE: '',
6
+ TEXT: 'text',
7
+ NUMBER: 'number',
8
+ BOOLEAN: 'boolean',
6
9
  DATE: 'date',
7
10
  DATERANGE: 'DATERANGE',
8
11
  TIME: 'time',