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

Commit 48d085f

Browse files
committed
chore: updates readme and docs
1 parent b8d711b commit 48d085f

13 files changed

Lines changed: 74 additions & 23 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ It's all about **animation** 🧙✨ - it can help with:
1212

1313
- [Moving an element](https://yubabajs.com/move) from one position to another
1414
- [Revealing elements](https://yubabajs.com/reveal-move) like you see above
15-
- [Supporting animations](https://yubabajs.com/circle-expand) by obstructing elements in view; and
16-
- [Hiding children elements](https://yubabajs.com/baba-manager) until animations have completed to trick users 🤫
15+
- [Supporting animations](https://yubabajs.com/supporting-animations) by obstructing elements in view; and
16+
- [Hiding children elements](https://yubabajs.com/advanced-usage#delay-showing-content-until-all-animations-have-finished) until animations have completed to trick users 🤫
1717
- [Orchestrating](https://yubabajs.com/advanced-usage#wait-for-the-previous-animation-to-finish-before-starting-the-next) when animations should happen and [in what order](https://yubabajs.com/advanced-usage#controlling-in-what-order-animations-should-execute)
18-
- Composing animations together to create [composite animations](https://yubabajs.com/cross-fade-move)
18+
- Composing animations together to create composite animations, for example [CrossFadeMove](https://yubabajs.com/cross-fade-move)
1919
- [Anything you can imagine](https://yubabajs.com/custom-animations), seriously 🤩
2020

2121
## Installation

packages/yubaba/src/__docs__/1-introduction/docs.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ It's all about **animation** 🧙✨ - it can help with:
2020

2121
- [Moving an element](/move) from one position to another
2222
- [Revealing elements](/reveal-move) like you see above
23-
- [Supporting animations](/circle-expand) by obstructing elements in view; and
24-
- [Hiding children elements](/baba-manager) until animations have completed to trick users 🤫
23+
- [Supporting animations](/supporting-animations) by obstructing elements in view; and
24+
- [Hiding children elements](/advanced-usage#delay-showing-content-until-all-animations-have-finished) until animations have completed to trick users 🤫
2525
- [Orchestrating](/advanced-usage#wait-for-the-previous-animation-to-finish-before-starting-the-next) when animations should happen and [in what order](/advanced-usage#controlling-in-what-order-animations-should-execute)
26-
- Composing animations together to create [composite animations](/cross-fade-move)
26+
- Composing animations together to create composite animations, for example [CrossFadeMove](/cross-fade-move)
2727
- [Anything you can imagine](/custom-animations), seriously 🤩
2828

2929
## Installation

packages/yubaba/src/__docs__/3-advanced-usage/docs.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,15 @@ Continuing the example above,
9393
if we introduce the Wait component:
9494

9595
```js
96+
import { Wait } from 'yubaba';
97+
9698
<Baba name="wait">
9799
<CrossFade>
98100
<Wait>
99101
<Move>{props => <div {...props} />}</Move>
100102
</Wait>
101103
</CrossFade>
102-
</Baba>
104+
</Baba>;
103105
```
104106

105107
Then the Move animation will wait for the CrossFade animation to complete finish before starting,
@@ -121,6 +123,8 @@ Luckily [BabaManager](/baba-manager) exists to do just that!
121123
Make it a parent of any [Baba](/baba) and it will show its content only when the animation has finished.
122124

123125
```js
126+
import { BabaManager } from 'yubaba';
127+
124128
<BabaManager>
125129
{manager => (
126130
<div>
@@ -133,7 +137,7 @@ Make it a parent of any [Baba](/baba) and it will show its content only when the
133137
<span {...manager}>Children content</span>
134138
</div>
135139
)}
136-
</BabaManager>
140+
</BabaManager>;
137141
```
138142

139143
Children content will be shown after **all** animations have completed.

packages/yubaba/src/__docs__/focal-animations/docs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ menu: Focal animations
99
The bread and butter of `yubaba` 🍞.
1010

1111
Focal animations are all about a single focal element that we want to transition from one state to another.
12-
While multiple elements _may_ be utilised in a focal animation,
12+
While multiple elements _may_ be utilised in a focal animation (e.g. how [RevealMove](/reveal-move) works),
1313
the animations are always interested in a single focal element.

packages/yubaba/src/__docs__/supporting-animations/docs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ menu: Supporting animations
66

77
# What are supporting animations?
88

9-
Supporting animations should be composed with [focal animations](/focal-animations) to create a seamless transitions between one view and another.
9+
Supporting animations should be composed with [focal animations](/focal-animations) to create seamless transitions between one view state and another.
1010
They generally create an element for the animation and then clean up once all animations have finished.

packages/yubaba/src/animations/ConcealMove/__docs__/docs.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Requires the use of the [FocalTarget](/focal-target) component to specify the fo
3939
import Baba, { ConcealMove, FocalTarget } from 'yubaba';
4040
```
4141

42+
Click the back button in the album art.
43+
4244
<Playground>
4345
{() => {
4446
const revealingImage = ({ albumArt }) => (

packages/yubaba/src/animations/Move/__docs__/docs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import * as Styled from './styled';
1414

1515
Useful for animating an element moving from one position to another,
1616
works best when the element has **very little visual difference**.
17-
This animation uses the [FLIP technique](https://css-tricks.com/animating-layouts-with-the-flip-technique/) so it is very performant.
17+
This animation uses the [FLIP technique](https://css-tricks.com/animating-layouts-with-the-flip-technique/) so it is quite performant.
1818

1919
## Usage
2020

packages/yubaba/src/animations/ReshapingContainer/__docz__/docs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import * as Styled from './styled';
1111

1212
# ReshapingContainer
1313

14-
A composite component that is made up of the [Move](/move) animation.
14+
A composite component that is made up of the [Move](/move) animation and some extra markup for the floating background.
1515
It has been made to be able to efficiently have the parent container resize around its children after state changes.
1616

1717
This is useful for anything where you want the background to nicely reshape itself around its children,
1818
for example a hover menu!
1919

20-
> **Tip -** When we say _efficiently_ we seriously mean it 🙌! _Only_ `transform` is utilised.
20+
> **Tip -** When we say _efficiently_ we mean it 🙌! _Only_ `transform` is utilised.
2121
2222
## Usage
2323

packages/yubaba/src/animations/ReshapingContainer/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export default class ReshapingContainer extends React.PureComponent<
121121
/**
122122
* Incremeent render count every time a render occurs.
123123
* We're abusing react "key" to trigger animations for now.
124+
* See: https://github.com/madou/yubaba/issues/100
124125
*/
125126
static getDerivedStateFromProps(_: ReshapingContainerProps, state: ReshapingContainerState) {
126127
return {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: SimpleReveal
3+
route: /simple-reveal
4+
menu: Focal animations
5+
---
6+
7+
import { Playground, PropsTable } from 'docz';
8+
import * as Common from 'yubaba-common';
9+
import Reveal from '../index';
10+
11+
# Reveal
12+
13+
Will reveal a container around a marked focal element using `width` and `height`,
14+
or alternatively `clip-path`.
15+
See [RevealMove](/reveal-move) for what this looks like.
16+
17+
This component requires the use of a [FocalTarget](/focal-target) to mark the focal element.
18+
19+
## Usage
20+
21+
```js
22+
import { Reveal } from 'yubaba';
23+
```
24+
25+
## Props
26+
27+
<PropsTable of={Reveal} />

0 commit comments

Comments
 (0)