ywana-core8 0.0.885 → 0.0.887

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.885",
3
+ "version": "0.0.887",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
package/src/html/tree.js CHANGED
@@ -19,11 +19,14 @@ export const Tree = ({ nodes = [], children }) => {
19
19
  * Tree Node
20
20
  */
21
21
  export const TreeNode = ({ icon = 'folder', label, tooltip, open=false, children, actions }) => {
22
+
23
+ const labelTxt = label ? <Text format={TEXTFORMATS.STRING}>{label}</Text> : null
24
+
22
25
  return (
23
26
  <details className="tree-node" open={open}>
24
27
  <summary className="tree-item">
25
28
  { icon ? <Icon icon={icon} size="small" small /> : null }
26
- <div className="label">{label}</div>
29
+ <div className="label">{labelTxt}</div>
27
30
  <div className="actions">{actions}</div>
28
31
  </summary>
29
32
  {children}
@@ -46,7 +49,7 @@ export const TreeItem = ({ id, icon = 'description', label, actions, onSelect, s
46
49
  return (
47
50
  <div className={`tree-item final ${style}`} onClick={select}>
48
51
  <Icon icon={icon} size="small" small />
49
- <div className="label">{label}</div>
52
+ <div className="label">{labelTxt}</div>
50
53
  <div className="actions">{actions}</div>
51
54
  </div>
52
55
  )
package/src/site/site.js CHANGED
@@ -225,12 +225,13 @@ const SiteMenu = ({ iconSrc, title, children, min }) => {
225
225
  <div className={`section-title ${style}`}>{sideNav === "max" ? title : ''}</div>
226
226
  {sections[title].map(({ id, icon = 'info', title }) => {
227
227
  const styleItem = id === page ? 'selected' : ''
228
+ const titleTxt = context.translate(title)
228
229
  return (
229
230
  <div className={`site-menu-item ${styleItem}`} key={id} onClick={() => goto(id)}>
230
231
  <Tooltip text={title} top=".5rem" left="2rem">
231
232
  <Icon key={id} icon={icon} clickable action={() => goto(id)} />
232
233
  </Tooltip>
233
- {sideNav === 'max' ? <label>{title}</label> : null}
234
+ {sideNav === 'max' ? <label>{titleTxt}</label> : null}
234
235
  </div>
235
236
  )
236
237
  })}