mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	This PR allows attributify for `variant`, `size` and `color` props. This allows using shorthands, instant of writing full props. We also added a small computed method to ensure these does not show up in the DOM and pollute it --------- Co-authored-by: Pranav <pranav@chatwoot.com>
		
			
				
	
	
		
			16 lines
		
	
	
		
			380 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			380 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
export const VARIANT_OPTIONS = ['solid', 'outline', 'faded', 'link', 'ghost'];
 | 
						|
export const COLOR_OPTIONS = ['blue', 'ruby', 'amber', 'slate', 'teal'];
 | 
						|
export const SIZE_OPTIONS = ['xs', 'sm', 'md', 'lg'];
 | 
						|
 | 
						|
export const EXCLUDED_ATTRS = [
 | 
						|
  'variant',
 | 
						|
  'color',
 | 
						|
  'size',
 | 
						|
  'icon',
 | 
						|
  'trailingIcon',
 | 
						|
  'isLoading',
 | 
						|
  ...VARIANT_OPTIONS,
 | 
						|
  ...COLOR_OPTIONS,
 | 
						|
  ...SIZE_OPTIONS,
 | 
						|
];
 |