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