diff --git a/app/javascript/dashboard/modules/search/components/SearchResultConversationItem.vue b/app/javascript/dashboard/modules/search/components/SearchResultConversationItem.vue new file mode 100644 index 000000000..1b8ec65d2 --- /dev/null +++ b/app/javascript/dashboard/modules/search/components/SearchResultConversationItem.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/app/javascript/dashboard/modules/search/stories/SearchResultConversationItem.stories.js b/app/javascript/dashboard/modules/search/stories/SearchResultConversationItem.stories.js new file mode 100644 index 000000000..ebfb75e65 --- /dev/null +++ b/app/javascript/dashboard/modules/search/stories/SearchResultConversationItem.stories.js @@ -0,0 +1,50 @@ +import SearchResultConversationItem from '../components/SearchResultConversationItem.vue'; + +export default { + title: 'Components/Search/SearchResultConversationItem', + component: SearchResultConversationItem, + argTypes: { + id: { + defaultValue: '123', + control: { + type: 'text', + }, + }, + name: { + defaultValue: 'John Doe', + control: { + type: 'text', + }, + }, + inbox: { + defaultValue: { + name: 'Livechat', + channel_type: 'Channel::WebWidget', + }, + control: { + type: 'object', + }, + }, + accountId: { + defaultValue: '7890', + control: { + type: 'text', + }, + }, + createdAt: { + defaultValue: '1677672962', + control: { + type: 'text', + }, + }, + }, +}; + +const Template = (args, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { SearchResultConversationItem }, + template: + '', +}); + +export const ResultConversationItem = Template.bind({});