mirror of
				https://github.com/BookStackApp/BookStack.git
				synced 2025-11-04 13:31:45 +03:00 
			
		
		
		
	May show bad option label names on chrome/safari. This was an easy first pass without loads of extra custom UI since we're using native datalists.
		
			
				
	
	
		
			26 lines
		
	
	
		
			675 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			675 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import {EditorContainerUiElement, EditorUiElement} from "../core";
 | 
						|
import {el} from "../../../utils/dom";
 | 
						|
import {EditorButton} from "../buttons";
 | 
						|
 | 
						|
 | 
						|
export class EditorActionField extends EditorContainerUiElement {
 | 
						|
    protected input: EditorUiElement;
 | 
						|
    protected action: EditorButton;
 | 
						|
 | 
						|
    constructor(input: EditorUiElement, action: EditorButton) {
 | 
						|
        super([input, action]);
 | 
						|
 | 
						|
        this.input = input;
 | 
						|
        this.action = action;
 | 
						|
    }
 | 
						|
 | 
						|
    buildDOM(): HTMLElement {
 | 
						|
        return el('div', {
 | 
						|
            class: 'editor-action-input-container',
 | 
						|
        }, [
 | 
						|
            this.input.getDOMElement(),
 | 
						|
            this.action.getDOMElement(),
 | 
						|
        ]);
 | 
						|
    }
 | 
						|
}
 |