ywana-core8 0.0.587 → 0.0.588

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.587",
3
+ "version": "0.0.588",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -7,7 +7,7 @@ import './accordion.css'
7
7
  */
8
8
  export const Accordion = (props) => {
9
9
 
10
- const { className, sections = [], onCheck } = props
10
+ const { className, sections = [], onCheck, children } = props
11
11
  const [openSections, setOpenSections] = useState([])
12
12
  const [checkedSections, setCheckedSections] = useState([])
13
13
 
@@ -37,6 +37,7 @@ export const Accordion = (props) => {
37
37
  return (
38
38
  <AccordionSection key={index} {...section} open={isOpen} checked={isChecked} onToggle={() => toggle(index)} onCheck={() => check(index)}>
39
39
  {section.children}
40
+ {children}
40
41
  </AccordionSection>
41
42
  )
42
43
  })}
@@ -28,10 +28,17 @@ const AccordionTest = (prop) => {
28
28
  { id: 17, checked: false, icon: 'star', title: 'Section 17', subtitle: 'Subtitle 17', info, toolbar, open: false, children: <div>Section 17 content</div> },
29
29
  ]
30
30
 
31
-
32
31
  return (
33
32
  <>
34
- <Accordion sections={sections} onCheck={console.log} />
33
+ <Accordion sections={sections} onCheck={console.log} >
34
+ {(section) => {
35
+ return (
36
+ <div>
37
+ {section.children}
38
+ </div>
39
+ )
40
+ }}
41
+ </Accordion>
35
42
  </>
36
43
  )
37
44
  }