Splattribute refactorings
This commit is contained in:
		
							parent
							
								
									2730cefd86
								
							
						
					
					
						commit
						8a047250ff
					
				
					 3 changed files with 35 additions and 31 deletions
				
			
		|  | @ -1,5 +1,8 @@ | |||
| {{#if this.sortedItems}} | ||||
|   <SortableGroupAccessible | ||||
|     @models={{this.sortedItems}} | ||||
|     tabindex="0" | ||||
|     class="shadow-md bg-gray-200 outline-none border border-gray-400 focus:border-teal-400 focus:shadow-lg" | ||||
|     as |groupHasFocus selectedIndex groupActions|> | ||||
|     <SortableGroup | ||||
|       @onChange={{action this.reorderMeals}} | ||||
|  | @ -11,7 +14,8 @@ | |||
|           @selectedIndex={{selectedIndex}} | ||||
|           @orderItemDown={{groupActions.orderItemDown}} | ||||
|           @orderItemUp={{groupActions.orderItemUp}} | ||||
|         @handleBlur={{groupActions.handleBlur}}> | ||||
|           @handleBlur={{groupActions.handleBlur}} | ||||
|           class="shadow-md bg-gray-200 outline-none border border-gray-400 focus:border-teal-400 focus:shadow-lg"> | ||||
|           <SortableItem | ||||
|             @model={{meal}} | ||||
|             @group={{group}} | ||||
|  | @ -26,3 +30,4 @@ | |||
|       {{/each}} | ||||
|     </SortableGroup> | ||||
|   </SortableGroupAccessible> | ||||
| {{/if}} | ||||
|  |  | |||
|  | @ -6,8 +6,7 @@ | |||
|   {{key-up this.handleArrowDown key='ArrowDown'}} | ||||
|   {{key-down this.preventDefault key='ArrowUp'}} | ||||
|   {{key-down this.preventDefault key='ArrowDown'}} | ||||
|   tabindex="0" | ||||
|   class="shadow-md bg-gray-200 outline-none border border-gray-400 focus:border-teal-400 focus:shadow-lg"> | ||||
|   ...attributes> | ||||
|   {{yield | ||||
|     this.groupHasFocus | ||||
|     this.selectedIndex | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| {{#let (and @groupHasFocus (eq @currentIndex @selectedIndex)) as |active|}} | ||||
|   <div class='border border-gray-400 {{if active 'relative border-orange-400'}}'> | ||||
|   <div class='border border-gray-400 {{if active 'relative border-orange-400'}}' ...attributes> | ||||
|     {{#if active}} | ||||
|       <button | ||||
|         {{on 'click' (fn @orderItemUp @currentIndex)}} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ava Wroten
						Ava Wroten