File tree 4 files changed +46
-54
lines changed
4 files changed +46
-54
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,11 @@ const App = () => {
108
108
< HotelRow onMouseLeave = { handleHover } onMouseEnter = { handleHover } >
109
109
< CarouselWapeer >
110
110
< Carousel hideArrow = { ! isHover } showDots >
111
- { images . map ( ( img , i ) => {
112
- return (
113
- < Carousel . Item key = { i } >
114
- < img src = { img } width = "100%" height = "200px" />
115
- </ Carousel . Item >
116
- )
117
- } ) }
111
+ { images . map ( ( img , i ) => (
112
+ < Carousel . Item key = { i } >
113
+ < img src = { img } width = "100%" height = "200px" />
114
+ </ Carousel . Item >
115
+ ) ) }
118
116
</ Carousel >
119
117
</ CarouselWapeer >
120
118
< div >
@@ -130,13 +128,11 @@ const App = () => {
130
128
</ div >
131
129
</ HotelRow >
132
130
< Code > { `<Carousel hideArrow={!isHover} showDots>
133
- {images.map((img, i) => {
134
- return (
135
- <Carousel.Item key={i}>
136
- <img src={img} width="100%" height="200px" />
137
- </Carousel.Item>
138
- )
139
- })}
131
+ {images.map((img, i) => (
132
+ <Carousel.Item key={i}>
133
+ <img src={img} width="100%" height="200px" />
134
+ </Carousel.Item>
135
+ ))}
140
136
</Carousel>` } </ Code >
141
137
< Reference >
142
138
< h2 align = "center" >
Original file line number Diff line number Diff line change @@ -88,39 +88,34 @@ const App = () => {
88
88
</ h2 >
89
89
< Notice > Notice: You should try this demo on mobile viewport size</ Notice >
90
90
< Carousel >
91
- { newsList . map ( ( { imageSrc, title, comment } , i ) => {
92
- return (
93
- < Carousel . Item key = { i } >
94
- < Item img = { imageSrc } >
95
- < Index >
96
- { i + 1 } /{ newsList . length }
97
- </ Index >
98
- < Detail >
99
- < Title > { title } </ Title >
100
- { ! ! comment && < Comment > { comment . count } comments</ Comment > }
101
- </ Detail >
102
- </ Item >
103
- </ Carousel . Item >
104
- )
105
- } ) }
91
+ { newsList . map ( ( { imageSrc, title, comment } , i ) => (
92
+ < Carousel . Item key = { i } >
93
+ < Item img = { imageSrc } >
94
+ < Index >
95
+ { i + 1 } /{ newsList . length }
96
+ </ Index >
97
+ < Detail >
98
+ < Title > { title } </ Title >
99
+ { ! ! comment && < Comment > { comment . count } comments</ Comment > }
100
+ </ Detail >
101
+ </ Item >
102
+ </ Carousel . Item >
103
+ ) ) }
106
104
</ Carousel >
107
- < Code > { `
108
- <Carousel>
109
- {newsList.map(({ imageSrc, title, comment }, i) => {
110
- return (
111
- <Carousel.Item key={i}>
112
- <Item img={imageSrc}>
113
- <Index>
114
- {i + 1}/{newsList.length}
115
- </Index>
116
- <Detail>
117
- <Title>{title}</Title>
118
- {!!comment && <Comment>{comment.count} comments</Comment>}
119
- </Detail>
120
- </Item>
121
- </Carousel.Item>
122
- )
123
- })}
105
+ < Code > { `<Carousel>
106
+ {newsList.map(({ imageSrc, title, comment }, i) => (
107
+ <Carousel.Item key={i}>
108
+ <Item img={imageSrc}>
109
+ <Index>
110
+ {i + 1}/{newsList.length}
111
+ </Index>
112
+ <Detail>
113
+ <Title>{title}</Title>
114
+ {!!comment && <Comment>{comment.count} comments</Comment>}
115
+ </Detail>
116
+ </Item>
117
+ </Carousel.Item>
118
+ ))}
124
119
</Carousel>` } </ Code >
125
120
< Reference >
126
121
< h2 align = "center" >
Original file line number Diff line number Diff line change @@ -76,13 +76,11 @@ const App = () => {
76
76
</ div >
77
77
< hr />
78
78
< Carousel cols = { cols } rows = { rows } gap = { gap } >
79
- { [ ...Array ( cols * rows * pages ) ] . map ( ( _ , i ) => {
80
- return (
81
- < Carousel . Item key = { i } >
82
- < Item img = { randomImageUrl + i } />
83
- </ Carousel . Item >
84
- )
85
- } ) }
79
+ { [ ...Array ( cols * rows * pages ) ] . map ( ( _ , i ) => (
80
+ < Carousel . Item key = { i } >
81
+ < Item img = { randomImageUrl + i } />
82
+ </ Carousel . Item >
83
+ ) ) }
86
84
</ Carousel >
87
85
Photo by{ ' ' }
88
86
< a
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ export default [
13
13
file : pkg . main ,
14
14
format : 'cjs'
15
15
} ,
16
- external : [ ...Object . keys ( pkg . dependencies ) ]
16
+ external : [
17
+ ...Object . keys ( pkg . dependencies ) ,
18
+ ...Object . keys ( pkg . peerDependencies )
19
+ ]
17
20
}
18
21
]
You can’t perform that action at this time.
0 commit comments