ywana-core8 0.0.601 → 0.0.602

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.601",
3
+ "version": "0.0.602",
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 { Property } from '../html'
2
+ import { Icon, Property } from '../html'
3
3
  import { Content, FORMATS, TYPES } from './ContentType'
4
4
  import './ContentViewer.css'
5
5
 
@@ -52,6 +52,8 @@ const FieldViewer = (props) => {
52
52
  if (hidden) return null;
53
53
 
54
54
  switch (type) {
55
+ case TYPES.BOOLEAN:
56
+ return <Property label={label} value={value} />
55
57
  case TYPES.STRING:
56
58
  return <StringViewer field={field} value={value} />
57
59
  case TYPES.ENTITY:
@@ -84,6 +86,15 @@ const EntityViewer = (props) => {
84
86
  )
85
87
  }
86
88
 
89
+ /**
90
+ * Boolean Viewer
91
+ */
92
+ const BooleanViewer = ({ id, value = false }) => {
93
+ const iconName = value === true ? "check_box" : "check_box_outline_blank"
94
+ const icon <Icon icon={iconName} />
95
+ return <Property label={label} value={icon} options={options} />
96
+ }
97
+
87
98
  /**
88
99
  * StringViewer
89
100
  */