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

Commit

Permalink
Merge pull request #88 from madou/rename-animation-data
Browse files Browse the repository at this point in the history
chore: renames baba internals
  • Loading branch information
Madou authored Dec 11, 2018
2 parents 7c857ce + c54740a commit 2236d92
Show file tree
Hide file tree
Showing 18 changed files with 272 additions and 266 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import styled from 'styled-components';
import StarIcon from '@material-ui/icons/StarBorder';
import Baba, { Move as Move, CircleExpand, Collector } from 'yubaba';
import Baba, { Move, CircleExpand, Collector } from 'yubaba';
import { Album as AlbumData } from './data';
import { IconButton } from '@material-ui/core';

Expand Down Expand Up @@ -104,7 +104,7 @@ const Album: React.StatelessComponent<Props> = ({
<Root emphasis={emphasis} color={color}>
<Baba name={baba}>
<Expand background={color}>
<Move delay={expand ? 100 : 0}>
<Move>
{({ ref, style }) => (
<BackgroundImage onClick={onClick} src={albumArt} style={style} innerRef={ref} />
)}
Expand Down
148 changes: 78 additions & 70 deletions packages/yubaba/src/Baba/__snapshots__/test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,49 @@
exports[`<Baba /> should pass dom data to child animation 1`] = `
Array [
Object {
"fromTarget": Object {
"containerElement": <div
"destination": Object {
"element": undefined,
"elementBoundingBox": Object {
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
},
"size": Object {
"height": 200,
"width": 100,
},
},
"focalTargetElement": undefined,
"focalTargetElementBoundingBox": undefined,
"render": undefined,
},
"origin": Object {
"element": <div
style="opacity: 1;"
/>,
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
"elementBoundingBox": Object {
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
},
"size": Object {
"height": 200,
"width": 100,
},
},
"focalTargetElement": undefined,
"focalTargetElementBoundingBox": undefined,
"render": [Function],
"size": Object {
"height": 200,
"width": 100,
},
"targetDOMData": undefined,
"targetElement": undefined,
},
"toTarget": Object {
"containerElement": undefined,
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
},
"render": undefined,
"size": Object {
"height": 200,
"width": 100,
},
"targetDOMData": undefined,
"targetElement": undefined,
},
},
]
Expand All @@ -50,45 +54,49 @@ Array [
exports[`<Baba /> should pass dom data to child animation when using in prop 1`] = `
Array [
Object {
"fromTarget": Object {
"containerElement": <div
"destination": Object {
"element": undefined,
"elementBoundingBox": Object {
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
},
"size": Object {
"height": 200,
"width": 100,
},
},
"focalTargetElement": undefined,
"focalTargetElementBoundingBox": undefined,
"render": undefined,
},
"origin": Object {
"element": <div
style="opacity: 1;"
/>,
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
"elementBoundingBox": Object {
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
},
"size": Object {
"height": 200,
"width": 100,
},
},
"focalTargetElement": undefined,
"focalTargetElementBoundingBox": undefined,
"render": [Function],
"size": Object {
"height": 200,
"width": 100,
},
"targetDOMData": undefined,
"targetElement": undefined,
},
"toTarget": Object {
"containerElement": undefined,
"location": Object {
"left": 0,
"top": 0,
},
"raw": Object {
"rect": Object {},
"scrollLeft": 0,
"scrollTop": 0,
},
"render": undefined,
"size": Object {
"height": 200,
"width": 100,
},
"targetDOMData": undefined,
"targetElement": undefined,
},
},
]
Expand Down
Loading

0 comments on commit 2236d92

Please sign in to comment.