Skip to content

Commit 308ad8f

Browse files
committed
v1.0.4
1 parent b6bb59b commit 308ad8f

File tree

9 files changed

+28
-17
lines changed

9 files changed

+28
-17
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ npm i @mrakesh0608/react-native-loading-dots
4040
import { View, Text, ScrollView } from 'react-native';
4141
import { LoadingDots } from '@mrakesh0608/react-native-loading-dots';
4242
43-
const list = ['elastic', 'flashing', 'typing', 'ping', 'pulse'];
43+
const list = ['elastic', 'flashing', 'pulse', 'ping', 'typing'];
4444
4545
export default function App() {
4646
return (
@@ -67,6 +67,20 @@ export default function App() {
6767
}
6868
```
6969

70+
## Styling Options
71+
72+
A list of available props to pass into the `<LoadingDots />` component:
73+
74+
| Props | Type | Default | Units | Description |
75+
| -------------- | ------ | ------- | ----- | ----------------------------------------------------------------------------------- |
76+
| animation | String | 'pulse' | - | Animation style : `elastic`, `flashing`, `ping`, `pulse`, `typing` |
77+
| color | String | 'black' | - | Color of dots |
78+
| containerStyle | Style | - | - | Container Style for Loading Dots top level component |
79+
| dots | Number | 3 | - | Number of dots to be displayed |
80+
| delay | Number | 280 | ms | Delay between the two dots |
81+
| size | Number | 10 | px | Size of dots |
82+
| spacing | Number | 2 | px | Space between dots |
83+
7084
## Author
7185
<div style="display:flex;align-items: center;">
7286
<img src='https://avatars.githubusercontent.com/u/101246871?v=sd4' alt = '👤' width='16px' height='16px'>

src/LoadingDots/types.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/LoadingDots/components/Container.tsx renamed to src/components/Container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function Container() {
3838
nodes.map((node, index) =>
3939
animationStyle({
4040
animation,
41-
delay: index * (delay ? delay : 260),
41+
delay: index * (delay ? delay : 280),
4242
node,
4343
size
4444
})
File renamed without changes.
File renamed without changes.

src/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/LoadingDots/index.tsx renamed to src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function LoadingDots({
1010
color = "black",
1111
size = 10,
1212
spacing = 2,
13-
delay = 260,
13+
delay = 280,
1414
containerStyle = {}
1515
}: LoadingDotsProps) {
1616
return (

src/types.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
export * from './LoadingDots/types';
1+
import { StyleProp, ViewStyle } from "react-native";
2+
3+
export type LoadingDotsProps = {
4+
animation?: "elastic" | "flashing" | "typing" | "ping" | 'pulse' | undefined;
5+
dots?: number;
6+
color?: string;
7+
size?: number;
8+
spacing?: number;
9+
delay?: number;
10+
containerStyle?: StyleProp<ViewStyle>;
11+
};
File renamed without changes.

0 commit comments

Comments
 (0)