ywana-core8 0.0.585 → 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/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +4 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +4 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/accordion.js +2 -1
- package/src/html/accordion.test.js +9 -2
- package/src/widgets/planner/Planner.js +1 -1
package/package.json
CHANGED
package/src/html/accordion.js
CHANGED
@@ -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
|
}
|
@@ -137,7 +137,7 @@ export const Planner = ({ title, events = [], lanes = [], navigation = true, onS
|
|
137
137
|
const isThisMonday = (date.moment.isSame(weekStart))
|
138
138
|
|
139
139
|
return (
|
140
|
-
<div key={`column-${date.moment.dayOfYear}`} className="column-header" ref={isThisMonday ? thisMondayElement : null}>
|
140
|
+
<div key={`column-${date.moment.dayOfYear()}`} className="column-header" ref={isThisMonday ? thisMondayElement : null}>
|
141
141
|
<div className={`date-header ${weekend} ${thisWeek}`}>
|
142
142
|
<Text use="headline6">{date.moment.format("DD")}</Text>
|
143
143
|
|