Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.

Commit c54740a

Browse files
committed
chore: renames props passed to animation components
BREAKING CHANGE: props passsed to animation components have changed, see the release notes for the migration guide.
1 parent 7c857ce commit c54740a

18 files changed

Lines changed: 272 additions & 266 deletions

File tree

packages/yubaba-examples/src/parentChild/musicPlayer/Album.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import styled from 'styled-components';
33
import StarIcon from '@material-ui/icons/StarBorder';
4-
import Baba, { Move as Move, CircleExpand, Collector } from 'yubaba';
4+
import Baba, { Move, CircleExpand, Collector } from 'yubaba';
55
import { Album as AlbumData } from './data';
66
import { IconButton } from '@material-ui/core';
77

@@ -104,7 +104,7 @@ const Album: React.StatelessComponent<Props> = ({
104104
<Root emphasis={emphasis} color={color}>
105105
<Baba name={baba}>
106106
<Expand background={color}>
107-
<Move delay={expand ? 100 : 0}>
107+
<Move>
108108
{({ ref, style }) => (
109109
<BackgroundImage onClick={onClick} src={albumArt} style={style} innerRef={ref} />
110110
)}

packages/yubaba/src/Baba/__snapshots__/test.tsx.snap

Lines changed: 78 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,49 @@
33
exports[`<Baba /> should pass dom data to child animation 1`] = `
44
Array [
55
Object {
6-
"fromTarget": Object {
7-
"containerElement": <div
6+
"destination": Object {
7+
"element": undefined,
8+
"elementBoundingBox": Object {
9+
"location": Object {
10+
"left": 0,
11+
"top": 0,
12+
},
13+
"raw": Object {
14+
"rect": Object {},
15+
"scrollLeft": 0,
16+
"scrollTop": 0,
17+
},
18+
"size": Object {
19+
"height": 200,
20+
"width": 100,
21+
},
22+
},
23+
"focalTargetElement": undefined,
24+
"focalTargetElementBoundingBox": undefined,
25+
"render": undefined,
26+
},
27+
"origin": Object {
28+
"element": <div
829
style="opacity: 1;"
930
/>,
10-
"location": Object {
11-
"left": 0,
12-
"top": 0,
13-
},
14-
"raw": Object {
15-
"rect": Object {},
16-
"scrollLeft": 0,
17-
"scrollTop": 0,
31+
"elementBoundingBox": Object {
32+
"location": Object {
33+
"left": 0,
34+
"top": 0,
35+
},
36+
"raw": Object {
37+
"rect": Object {},
38+
"scrollLeft": 0,
39+
"scrollTop": 0,
40+
},
41+
"size": Object {
42+
"height": 200,
43+
"width": 100,
44+
},
1845
},
46+
"focalTargetElement": undefined,
47+
"focalTargetElementBoundingBox": undefined,
1948
"render": [Function],
20-
"size": Object {
21-
"height": 200,
22-
"width": 100,
23-
},
24-
"targetDOMData": undefined,
25-
"targetElement": undefined,
26-
},
27-
"toTarget": Object {
28-
"containerElement": undefined,
29-
"location": Object {
30-
"left": 0,
31-
"top": 0,
32-
},
33-
"raw": Object {
34-
"rect": Object {},
35-
"scrollLeft": 0,
36-
"scrollTop": 0,
37-
},
38-
"render": undefined,
39-
"size": Object {
40-
"height": 200,
41-
"width": 100,
42-
},
43-
"targetDOMData": undefined,
44-
"targetElement": undefined,
4549
},
4650
},
4751
]
@@ -50,45 +54,49 @@ Array [
5054
exports[`<Baba /> should pass dom data to child animation when using in prop 1`] = `
5155
Array [
5256
Object {
53-
"fromTarget": Object {
54-
"containerElement": <div
57+
"destination": Object {
58+
"element": undefined,
59+
"elementBoundingBox": Object {
60+
"location": Object {
61+
"left": 0,
62+
"top": 0,
63+
},
64+
"raw": Object {
65+
"rect": Object {},
66+
"scrollLeft": 0,
67+
"scrollTop": 0,
68+
},
69+
"size": Object {
70+
"height": 200,
71+
"width": 100,
72+
},
73+
},
74+
"focalTargetElement": undefined,
75+
"focalTargetElementBoundingBox": undefined,
76+
"render": undefined,
77+
},
78+
"origin": Object {
79+
"element": <div
5580
style="opacity: 1;"
5681
/>,
57-
"location": Object {
58-
"left": 0,
59-
"top": 0,
60-
},
61-
"raw": Object {
62-
"rect": Object {},
63-
"scrollLeft": 0,
64-
"scrollTop": 0,
82+
"elementBoundingBox": Object {
83+
"location": Object {
84+
"left": 0,
85+
"top": 0,
86+
},
87+
"raw": Object {
88+
"rect": Object {},
89+
"scrollLeft": 0,
90+
"scrollTop": 0,
91+
},
92+
"size": Object {
93+
"height": 200,
94+
"width": 100,
95+
},
6596
},
97+
"focalTargetElement": undefined,
98+
"focalTargetElementBoundingBox": undefined,
6699
"render": [Function],
67-
"size": Object {
68-
"height": 200,
69-
"width": 100,
70-
},
71-
"targetDOMData": undefined,
72-
"targetElement": undefined,
73-
},
74-
"toTarget": Object {
75-
"containerElement": undefined,
76-
"location": Object {
77-
"left": 0,
78-
"top": 0,
79-
},
80-
"raw": Object {
81-
"rect": Object {},
82-
"scrollLeft": 0,
83-
"scrollTop": 0,
84-
},
85-
"render": undefined,
86-
"size": Object {
87-
"height": 200,
88-
"width": 100,
89-
},
90-
"targetDOMData": undefined,
91-
"targetElement": undefined,
92100
},
93101
},
94102
]

0 commit comments

Comments
 (0)