parent
70c6ebcc5c
commit
5d8b70920a
8 changed files with 118 additions and 42 deletions
@ -1,31 +1,30 @@ |
|||||||
import React, { Component } from 'react'; |
import React, { Component } from 'react'; |
||||||
import Carousel from 'react-elastic-carousel'; |
import Carousel from 'react-elastic-carousel'; |
||||||
import './ChatSuggest.scss'; |
import './ChatSuggest.scss'; |
||||||
export default class ChatSuggest extends Component { |
export default function suggetbar({ suggest }) { |
||||||
render() { |
return ( |
||||||
const { suggest } = this.props; |
<div className="chat-suggest portrait-slider d-flex flex-column"> |
||||||
return ( |
<Carousel itemsToShow={1} isRTL={true} enableTilt={true} showArrows={false}> |
||||||
<div className="chat-suggest portrait-slider d-flex flex-column"> |
{suggest.map((row, i) => ( |
||||||
<Carousel itemsToShow={1} isRTL={true} enableTilt={true} showArrows={false}> |
<Row row={row} key={i} /> |
||||||
{suggest.map((row, i) => ( |
))} |
||||||
<Row row={row} key={i} /> |
</Carousel> |
||||||
))} |
</div> |
||||||
</Carousel> |
); |
||||||
</div> |
|
||||||
); |
|
||||||
} |
|
||||||
} |
} |
||||||
|
|
||||||
const Row = (row) => { |
const Row = ({ row }) => { |
||||||
return ( |
return ( |
||||||
<div className="chat-suggest__row d-flex"> |
<div className="chat-suggest__row d-flex"> |
||||||
{row.map((item, i) => ( |
<Suggest item={row[0]} /> |
||||||
|
{/* {row.map((item, i) => ( |
||||||
<Suggest item={item} key={i} /> |
<Suggest item={item} key={i} /> |
||||||
))} |
))} */} |
||||||
</div> |
</div> |
||||||
); |
); |
||||||
}; |
}; |
||||||
|
|
||||||
const Suggest = (item) => { |
const Suggest = (item) => { |
||||||
|
console.log(item.text); |
||||||
return <div className="chat-suggest__row--item d-flex">{item.text}</div>; |
return <div className="chat-suggest__row--item d-flex">{item.text}</div>; |
||||||
}; |
}; |
||||||
|
Loading…
Reference in new issue