Skip to content

Commit 53648c7

Browse files
docs: add code comments
1 parent 1f1434f commit 53648c7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ interface CSSAnimationProps {
2727
style?: CSSStyleDeclaration;
2828
}
2929

30+
/**
31+
* A `spin` style object to an `Animated` component add a linear spinning animation. Great for loaders.
32+
*/
3033
export const spin: CSSStyleDeclaration = {
3134
animationName: {
3235
to: {
@@ -50,6 +53,9 @@ export function Spin({
5053
);
5154
}
5255

56+
/**
57+
* Add `ping` style object to an `Animated` component to make the element scale and fade. Great for attention grabbing elements like notifications.
58+
*/
5359
export const ping: CSSStyleDeclaration = {
5460
animationName: {
5561
'75%, 100%': {
@@ -74,6 +80,9 @@ export function Ping({
7480
);
7581
}
7682

83+
/**
84+
* Add `pulse` style object to an `Animated` component to make it fade in and out. Great for skeleton loaders.
85+
*/
7786
export const pulse: CSSStyleDeclaration = {
7887
animationName: {
7988
'50%': {
@@ -97,6 +106,9 @@ export function Pulse({
97106
);
98107
}
99108

109+
/**
110+
* Add `bounce` style object to an `Animated` component to make it bounce up and down. Great for scroll down indicators.
111+
*/
100112
export const bounce: CSSStyleDeclaration = {
101113
animationName: {
102114
'0%, 100%': {
@@ -124,6 +136,9 @@ export function Bounce({
124136
);
125137
}
126138

139+
/**
140+
* Add `shimmer` style object to an `Animated` component to make it animate from left to right indefinitely. Great for shimmer loading effect.
141+
*/
127142
export const shimmer: CSSStyleDeclaration = {
128143
animationName: {
129144
from: {

0 commit comments

Comments
 (0)