mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	* Feat: Creates label dropdown component * fixes conflicts in i18n Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
		
			
				
	
	
		
			40 lines
		
	
	
		
			805 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			805 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { action } from '@storybook/addon-actions';
 | 
						|
import LabelDropdownItem from './LabelDropdownItem';
 | 
						|
 | 
						|
export default {
 | 
						|
  title: 'Components/Label/Item',
 | 
						|
  component: LabelDropdownItem,
 | 
						|
  argTypes: {
 | 
						|
    title: {
 | 
						|
      defaultValue: 'sales',
 | 
						|
      control: {
 | 
						|
        type: 'text',
 | 
						|
      },
 | 
						|
    },
 | 
						|
    color: {
 | 
						|
      defaultValue: '#555',
 | 
						|
      control: {
 | 
						|
        type: 'text',
 | 
						|
      },
 | 
						|
    },
 | 
						|
    selected: {
 | 
						|
      defaultValue: true,
 | 
						|
      control: {
 | 
						|
        type: 'boolean',
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
 | 
						|
const Template = (args, { argTypes }) => ({
 | 
						|
  props: Object.keys(argTypes),
 | 
						|
  components: { LabelDropdownItem },
 | 
						|
  template:
 | 
						|
    '<label-dropdown-item v-bind="$props" @click="onClick"></label-dropdown-item>',
 | 
						|
});
 | 
						|
 | 
						|
export const item = Template.bind({});
 | 
						|
item.args = {
 | 
						|
  onClick: action('Selected'),
 | 
						|
};
 |