cozy-ui 60.8.1 → 60.8.2
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [60.8.2](https://github.com/cozy/cozy-ui/compare/v60.8.1...v60.8.2) (2022-01-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Auto ref on BottomSheet Header now use displayName too ([0f1e067](https://github.com/cozy/cozy-ui/commit/0f1e067))
|
|
7
|
+
|
|
1
8
|
## [60.8.1](https://github.com/cozy/cozy-ui/compare/v60.8.0...v60.8.1) (2022-01-26)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -120,7 +120,10 @@ const BottomSheet = ({ toolbarProps, settings, children }) => {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
const overriddenChildren = React.Children.map(children, child => {
|
|
123
|
-
if (
|
|
123
|
+
if (
|
|
124
|
+
child.type.name === 'BottomSheetHeader' ||
|
|
125
|
+
child.type.displayName === 'BottomSheetHeader'
|
|
126
|
+
) {
|
|
124
127
|
return React.cloneElement(child, { headerContentRef })
|
|
125
128
|
}
|
|
126
129
|
return child
|
|
@@ -176,9 +179,9 @@ BottomSheet.propTypes = {
|
|
|
176
179
|
/** Toolbar properties */
|
|
177
180
|
toolbarProps: PropTypes.shape({
|
|
178
181
|
/** React reference of the toolbar node */
|
|
179
|
-
ref: PropTypes.
|
|
182
|
+
ref: PropTypes.object,
|
|
180
183
|
/** Toolbar height value */
|
|
181
|
-
height: PropTypes.
|
|
184
|
+
height: PropTypes.number
|
|
182
185
|
}),
|
|
183
186
|
/** Settings that can be modified */
|
|
184
187
|
settings: PropTypes.shape({
|
|
@@ -130,7 +130,7 @@ var BottomSheet = function BottomSheet(_ref2) {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
var overriddenChildren = React.Children.map(children, function (child) {
|
|
133
|
-
if (child.type.name === 'BottomSheetHeader') {
|
|
133
|
+
if (child.type.name === 'BottomSheetHeader' || child.type.displayName === 'BottomSheetHeader') {
|
|
134
134
|
return React.cloneElement(child, {
|
|
135
135
|
headerContentRef: headerContentRef
|
|
136
136
|
});
|
|
@@ -187,10 +187,10 @@ BottomSheet.propTypes = {
|
|
|
187
187
|
/** Toolbar properties */
|
|
188
188
|
toolbarProps: PropTypes.shape({
|
|
189
189
|
/** React reference of the toolbar node */
|
|
190
|
-
ref: PropTypes.
|
|
190
|
+
ref: PropTypes.object,
|
|
191
191
|
|
|
192
192
|
/** Toolbar height value */
|
|
193
|
-
height: PropTypes.
|
|
193
|
+
height: PropTypes.number
|
|
194
194
|
}),
|
|
195
195
|
|
|
196
196
|
/** Settings that can be modified */
|