mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	Fixes #241 Fixes: chatwoot/product#648 Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com> Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
		
			
				
	
	
		
			68 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { action } from '@storybook/addon-actions';
 | 
						|
import DropdownItems from './MultiselectDropdownItems';
 | 
						|
 | 
						|
export default {
 | 
						|
  title: 'Components/Dropdown/Multiselect Dropdown Items',
 | 
						|
  component: DropdownItems,
 | 
						|
  argTypes: {
 | 
						|
    options: {
 | 
						|
      control: {
 | 
						|
        type: 'object',
 | 
						|
      },
 | 
						|
    },
 | 
						|
    selectedItems: {
 | 
						|
      control: {
 | 
						|
        type: 'object',
 | 
						|
      },
 | 
						|
    },
 | 
						|
    inputPlaceholder: {
 | 
						|
      control: {
 | 
						|
        type: 'text',
 | 
						|
      },
 | 
						|
    },
 | 
						|
    noSearchResult: {
 | 
						|
      control: {
 | 
						|
        type: 'text',
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
 | 
						|
const Template = (args, { argTypes }) => ({
 | 
						|
  props: Object.keys(argTypes),
 | 
						|
  components: { DropdownItems },
 | 
						|
  template:
 | 
						|
    '<dropdown-items v-bind="$props" @click="onClick"></dropdown-items>',
 | 
						|
});
 | 
						|
 | 
						|
export const MultiselectDropdownItems = Template.bind({});
 | 
						|
MultiselectDropdownItems.args = {
 | 
						|
  onClick: action('Added'),
 | 
						|
  options: [
 | 
						|
    {
 | 
						|
      id: '0',
 | 
						|
      name: 'None',
 | 
						|
      thumbnail: '',
 | 
						|
    },
 | 
						|
    {
 | 
						|
      id: '1',
 | 
						|
      name: 'James Philip',
 | 
						|
      availability_status: 'online',
 | 
						|
      role: 'administrator',
 | 
						|
      thumbnail: 'https://randomuser.me/api/portraits/men/4.jpg',
 | 
						|
    },
 | 
						|
    {
 | 
						|
      id: '2',
 | 
						|
      name: 'Support Team',
 | 
						|
      thumbnail: '',
 | 
						|
    },
 | 
						|
    {
 | 
						|
      id: '3',
 | 
						|
      name: 'Agent',
 | 
						|
      thumbnail: '',
 | 
						|
    },
 | 
						|
  ],
 | 
						|
 | 
						|
  selectedItems: [{ id: '1' }],
 | 
						|
};
 |