|
|
|
@ -66,6 +66,10 @@ export default class PopupElement {
@@ -66,6 +66,10 @@ export default class PopupElement {
|
|
|
|
|
const buttonsDiv = document.createElement('div'); |
|
|
|
|
buttonsDiv.classList.add('popup-buttons'); |
|
|
|
|
|
|
|
|
|
if(buttons.length === 2) { |
|
|
|
|
buttonsDiv.classList.add('popup-buttons-row'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const buttonsElements = buttons.map(b => { |
|
|
|
|
const button = document.createElement('button'); |
|
|
|
|
button.className = 'btn' + (b.isDanger ? ' danger' : ''); |
|
|
|
|