File tree 4 files changed +8
-27
lines changed
packages/venia-concept/src/components 4 files changed +8
-27
lines changed Original file line number Diff line number Diff line change 1
1
import { Component , createElement } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
+ import { List } from '@magento/peregrine' ;
3
4
4
5
import classify from 'src/classify' ;
5
- import List from 'src/components/List' ;
6
6
import Thumbnail from './thumbnail' ;
7
7
import defaultClasses from './thumbnailList.css' ;
8
8
9
- const getItemKey = ( { id } ) => id ;
10
-
11
9
class ThumbnailList extends Component {
12
10
static propTypes = {
13
11
classes : PropTypes . shape ( {
14
12
root : PropTypes . string
15
13
} ) ,
16
- items : PropTypes . oneOfType ( [
17
- PropTypes . instanceOf ( Map ) ,
18
- PropTypes . arrayOf ( PropTypes . object )
19
- ] )
14
+ items : PropTypes . arrayOf ( PropTypes . object ) . isRequired
20
15
} ;
21
16
22
17
render ( ) {
23
- return (
24
- < List
25
- renderItem = { Thumbnail }
26
- getItemKey = { getItemKey }
27
- { ...this . props }
28
- />
29
- ) ;
18
+ return < List renderItem = { Thumbnail } { ...this . props } /> ;
30
19
}
31
20
}
32
21
Original file line number Diff line number Diff line change 1
1
import { Component , createElement } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
+ import { List } from '@magento/peregrine' ;
3
4
4
5
import classify from 'src/classify' ;
5
- import List from 'src/components/List' ;
6
6
import Swatch from './swatch' ;
7
7
import defaultClasses from './swatchList.css' ;
8
8
9
- const getItemKey = ( { id } ) => id ;
10
-
11
9
class SwatchList extends Component {
12
10
static propTypes = {
13
11
classes : PropTypes . shape ( {
@@ -17,9 +15,7 @@ class SwatchList extends Component {
17
15
} ;
18
16
19
17
render ( ) {
20
- return (
21
- < List renderItem = { Swatch } getItemKey = { getItemKey } { ...this . props } />
22
- ) ;
18
+ return < List renderItem = { Swatch } { ...this . props } /> ;
23
19
}
24
20
}
25
21
Original file line number Diff line number Diff line change 1
1
import { Component , createElement } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
+ import { List } from '@magento/peregrine' ;
3
4
4
5
import classify from 'src/classify' ;
5
- import List from 'src/components/List' ;
6
6
import Tile from './tile' ;
7
7
import defaultClasses from './tileList.css' ;
8
8
9
- const getItemKey = ( { id } ) => id ;
10
-
11
9
class TileList extends Component {
12
10
static propTypes = {
13
11
classes : PropTypes . shape ( {
@@ -17,9 +15,7 @@ class TileList extends Component {
17
15
} ;
18
16
19
17
render ( ) {
20
- return (
21
- < List renderItem = { Tile } getItemKey = { getItemKey } { ...this . props } />
22
- ) ;
18
+ return < List renderItem = { Tile } { ...this . props } /> ;
23
19
}
24
20
}
25
21
Original file line number Diff line number Diff line change 1
1
import { Component , createElement } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
+ import { List } from '@magento/peregrine' ;
3
4
4
5
import classify from 'src/classify' ;
5
- import List from 'src/components/List' ;
6
6
import Option from './option' ;
7
7
import defaultClasses from './select.css' ;
8
8
You can’t perform that action at this time.
0 commit comments