-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
92 changed files
with
3,425 additions
and
2,261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
import React from 'react'; | ||
import { render } from 'enzyme'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import ListItem from 'components/ListItem'; | ||
import List from '../index'; | ||
|
||
describe('<List />', () => { | ||
it('should render the component if no items are passed', () => { | ||
const renderedComponent = render( | ||
const renderedComponent = shallow( | ||
<List component={ListItem} /> | ||
); | ||
expect(renderedComponent.find(ListItem)).toBeDefined(); | ||
}); | ||
|
||
it('should render the items', () => { | ||
it('should pass all items props to rendered component', () => { | ||
const items = [ | ||
{ id: 1, name: 'Hello' }, | ||
{ id: 2, name: 'World' }, | ||
]; | ||
const item = ({ name }) => <div>{name}</div>; // eslint-disable-line react/prop-types | ||
const renderedComponent = render( | ||
<List items={items} component={item} /> | ||
|
||
const component = ({ item }) => <ListItem>{item.name}</ListItem>; // eslint-disable-line react/prop-types | ||
|
||
const renderedComponent = shallow( | ||
<List items={items} component={component} /> | ||
); | ||
expect(renderedComponent.find(items)).toBeDefined(); | ||
expect(renderedComponent.find(component)).toHaveLength(2); | ||
expect(renderedComponent.find(component).at(0).prop('item')).toBe(items[0]); | ||
expect(renderedComponent.find(component).at(1).prop('item')).toBe(items[1]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import styled from 'styled-components'; | ||
|
||
export default styled.div` | ||
const ProgressBarPercent = styled.div` | ||
height: 2px; | ||
background: #29D; | ||
transition: all 300ms ease; | ||
`; | ||
|
||
export default ProgressBarPercent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.