ywana-core8 0.0.80 → 0.0.84

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.80",
3
+ "version": "0.0.84",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -17,7 +17,9 @@ export const ContentEditor = ({ content, filter, onChange }) => {
17
17
  const sections = content.sections()
18
18
  return (
19
19
  <div className='content-editor'>
20
- {sections.map((section) => {
20
+ {sections
21
+ .filter(section => section.fields && 0 < section.fields.length)
22
+ .map((section) => {
21
23
  const { title, fields } = section
22
24
  return (
23
25
  <section key={title}>
@@ -4,6 +4,17 @@ import RSwitch from 'react-switch'
4
4
  export const Switch = (props) => {
5
5
 
6
6
  return (
7
- <RSwitch {...props} />
7
+ <RSwitch {...props}
8
+ onColor="#86d3ff"
9
+ onHandleColor="#2693e6"
10
+ handleDiameter={30}
11
+ uncheckedIcon={false}
12
+ checkedIcon={false}
13
+ boxShadow="0px 1px 5px rgba(0, 0, 0, 0.6)"
14
+ activeBoxShadow="0px 0px 1px 10px rgba(0, 0, 0, 0.2)"
15
+ height={20}
16
+ width={48}
17
+ className="react-switch"
18
+ />
8
19
  )
9
20
  }
@@ -16,7 +16,7 @@ export const TextField = (props) => {
16
16
  function onKeyPress(event) {
17
17
  var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
18
18
  if (key == 13) {
19
- onEnter()
19
+ if (onEnter) onEnter()
20
20
  }
21
21
  }
22
22