Skip to content

Commit

Permalink
set delay by default to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
fakiolinho committed Apr 18, 2018
1 parent 8e06a0e commit bcf9924
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default Example;
|:------:|:------:|:---------------:|
| type | String | balls |
| color | String | `#ffffff` |
| delay | Number | 1000 (msecs) |
| delay | Number | 0 (msecs) |
| height | Number | 64 (px) |
| width | Number | 64 (px) |
| className | String | `''` |
Expand Down
4 changes: 2 additions & 2 deletions lib/__tests__/react-loading.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ describe('test Loading component', () => {
});

it('delayed key in state should be equal to false if prop delay is 0', () => {
const enzymeWrapper = shallow(<Loading delay={0} />);
const enzymeWrapper = shallow(<Loading />);

expect(enzymeWrapper.state('delayed')).toEqual(false);
});

it('delayed in state should be truthy when props delay is bigger than 0', () => {
const enzymeWrapper = shallow(<Loading />);
const enzymeWrapper = shallow(<Loading delay={100} />);

expect(enzymeWrapper.state('delayed')).toEqual(true);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/react-loading.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class Loading extends Component {

static defaultProps = {
color: '#fff',
delay: 1000,
delay: 0,
type: 'balls',
height: 64,
width: 64,
Expand Down

0 comments on commit bcf9924

Please sign in to comment.