You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
814 B
31 lines
814 B
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> |
|
); |
|
} |
|
} |
|
|
|
const Row = (row) => { |
|
return ( |
|
<div className="chat-suggest__row d-flex"> |
|
{row.map((item, i) => ( |
|
<Suggest item={item} key={i} /> |
|
))} |
|
</div> |
|
); |
|
}; |
|
|
|
const Suggest = (item) => { |
|
return <div className="chat-suggest__row--item d-flex">{item.text}</div>; |
|
};
|
|
|