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

Commit bc154a3

Browse files
committed
chore: updates docs
1 parent 485d259 commit bc154a3

19 files changed

Lines changed: 160 additions & 15 deletions

File tree

packages/yubaba/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"size-limit": [
2626
{
27-
"limit": "6 KB",
27+
"limit": "7 KB",
2828
"path": "dist/esm/packages/yubaba/src/index.js"
2929
}
3030
],

packages/yubaba/src/Collector/__docs__/docs.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Collector
33
route: /collector
4+
menu: Utility Helpers
45
---
56

67
import { Playground, PropsTable } from 'docz';

packages/yubaba/src/FocalTarget/__docs__/docs.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: FocalTarget
33
route: /focal-target
4+
menu: Focal Animations
45
---
56

67
import { Playground, PropsTable } from 'docz';

packages/yubaba/src/Wait/__docs__/docs.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Wait
33
route: /wait
4+
menu: Utility Helpers
45
---
56

67
import { Playground, PropsTable } from 'docz';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: CircleExpand
33
route: /circle-expand
4+
menu: Supporting Animations
45
---
56

67
import { Playground, PropsTable } from 'docz';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: CircleShrink
33
route: /circle-shrink
4+
menu: Supporting Animations
45
---
56

67
import { Playground, PropsTable } from 'docz';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: ConcealMove
33
route: /conceal-move
4+
menu: Focal Animations
45
---
56

67
import { Playground, PropsTable } from 'docz';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: CrossFadeMove
33
route: /cross-fade-move
4+
menu: Focal Animations
45
---
56

67
import { Playground, PropsTable } from 'docz';
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: FadeMove
3+
route: /fade-move
4+
menu: Focal Animations
5+
---
6+
7+
import { Playground, PropsTable } from 'docz';
8+
import * as Common from 'yubaba-common';
9+
import Baba from '../../../Baba';
10+
import FadeMove from '../index';
11+
import * as Styled from './styled';
12+
13+
# FadeMove
14+
15+
Will clone the origin element and position it absolutely then animate it ontop of the destination element,
16+
while fading out.
17+
18+
Generally you'd want to use [Move](/move) or [CrossFadeMove](/cross-fade-move) over this.
19+
20+
## Usage
21+
22+
```js
23+
import { FadeMove } from 'yubaba';
24+
```
25+
26+
<Playground>
27+
<Common.Toggler>
28+
{({ shown, toggle }) =>
29+
shown ? (
30+
<Baba name="fade-move" key="1">
31+
<FadeMove>
32+
{({ ref, style }) => (
33+
<Styled.Box onClick={() => toggle()} style={style} innerRef={ref}>
34+
Hello, world!
35+
</Styled.Box>
36+
)}
37+
</FadeMove>
38+
</Baba>
39+
) : (
40+
<Baba name="fade-move" key="2">
41+
<FadeMove>
42+
{({ ref, style }) => (
43+
<Styled.Box style={style} innerRef={ref} onClick={() => toggle()} alignRight>
44+
Hello, world!
45+
</Styled.Box>
46+
)}
47+
</FadeMove>
48+
</Baba>
49+
)
50+
}
51+
</Common.Toggler>
52+
</Playground>
53+
54+
## Props
55+
56+
<PropsTable of={FadeMove} />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import styled from 'styled-components';
2+
3+
export const Box = styled.div<{ alignRight: boolean }>`
4+
display: flex;
5+
align-items: center;
6+
justify-content: center;
7+
color: white;
8+
font-size: 24px;
9+
width: 250px;
10+
height: 250px;
11+
background-color: #dc143c;
12+
cursor: pointer;
13+
margin-left: ${props => (props.alignRight ? '0' : 'auto')};
14+
`;

0 commit comments

Comments
 (0)