UNPKG
@sb1/ffe-collapse-react
Version:
latest (101.0.5)
101.0.5
101.0.4
101.0.3
101.0.2
101.0.1
101.0.0
100.12.4
100.12.3
100.12.2
100.12.1
100.12.0
100.11.0
100.10.1
100.10.0
100.9.0
100.8.3
100.8.2
100.8.1
100.8.0
100.7.1
100.7.0
100.6.1
100.6.0
100.5.2
100.5.1
100.5.0
100.4.3
100.4.2
100.4.1
100.4.0
100.3.1
100.3.0
100.2.1
100.2.0
100.1.1
100.1.0
100.0.4
100.0.3
100.0.0
5.1.38
5.1.37
5.1.36
5.1.35
5.1.34
5.1.33
5.1.32
5.1.31
5.1.30
5.1.29
5.1.28
5.1.27
5.1.26
5.1.25
5.1.24
5.1.23
5.1.22
5.1.21
5.1.20
5.1.19
5.1.18
5.1.17
5.1.16
5.1.15
5.1.14
5.1.13
5.1.12
5.1.11
5.1.10
5.1.9
5.1.8
5.1.7
5.1.6
5.1.5
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0
5.0.14
5.0.13
5.0.12
5.0.11
5.0.10
5.0.9
5.0.8
5.0.7
5.0.6
5.0.5
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0
4.0.10
4.0.9
4.0.8
4.0.7
4.0.6
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.0.14
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.1.15
1.1.14
1.1.13
1.1.12
1.1.11
1.1.10
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
React component for expand/collapse
github.com/SpareBank1/designsystem
SpareBank1/designsystem
@sb1/ffe-collapse-react
/
es
/
mergeRefs.js
14 lines
(13 loc)
•
343 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export function
mergeRefs
(
refs
)
{
return
value
=> { refs.forEach(
ref
=> {
if
(
typeof
ref
===
'function'
) {
ref
(
value
); }
else
if
(
ref
!=
null
) {
// eslint-disable-next-line no-param-reassign
ref
.current =
value
; } }); }; }