Articles
ArticlesGrid
The ArticlesGrid component should wrap and display all the articles coming from the redux store when on the articles list page.
Props
| Prop | Type | Description |
|---|---|---|
| gridClass | string | className for the wrapper, is required |
| ArticleItem | elementType - isRequired | Article card component, is required. Must have article as a prop |
| noArticlesClass | string | className for the div containing the message 'No articles found...' |
LoadMoreButton
The LoadMoreButton when on the articles list page, will load the next page of articles, show a loader during fetching and hide when error or no more articles to show.
It requires for the _articles_list.ljson (the default from Ctesius or the custom one placed in views/articles ) containing the following code:
Props
| Prop | Type | Description |
|---|---|---|
| CustomLoader | elementType | What will be displayed when loading more articles. Displays default if not privided |
| loadMoreButtonClass | string | className for the button |
| loadMoreButtonContainerClass | string | className for the parent div |
| children | node | What the button displays inside, is required |
TopicSelector
The TopicSelector component will display a list of available topics used by the agent.
It requires for the _articles_list.ljson (the default from Ctesius or the custom one placed in views/articles ) containing the following code:
The variable topicsData is not required. In this example is used to display the current topic.
If removed, update the block: {topicsData || 'Select topic'}
Props
Homeflow is now using Tailwind, utility classes can be passed to the component children.
| Prop | Type | Description |
|---|---|---|
| containerClass | string | className for the container |
| buttonClassShowTopics | string | className for the button when topics are visible |
| buttonClassHideTopics | string | className for the button when topics are not visible |
| listWrapperClass | string | className for the list wrapper |
| ulClass | string | className for the ul listing all the topics |
| listAnchorTagClass | string | className for the link to the topic (a inside li) |
| children | node | What the component displays inside at all times, is required |