|
1 | 1 | import { AbstractEditor } from '../editor.js' |
2 | 2 | import { extend, trigger } from '../utilities.js' |
| 3 | +import rules from './array.css.js' |
3 | 4 |
|
4 | 5 | export class ArrayEditor extends AbstractEditor { |
5 | 6 | askConfirmation () { |
@@ -631,7 +632,6 @@ export class ArrayEditor extends AbstractEditor { |
631 | 632 | this.collapsed = false |
632 | 633 | this.toggle_button = this.getButton('', 'collapse', this.translate('button_collapse')) |
633 | 634 | this.toggle_button.classList.add('json-editor-btntype-toggle') |
634 | | - this.toggle_button.style.margin = '0 10px 0 0' |
635 | 635 | this.title.insertBefore(this.toggle_button, this.title.childNodes[0]) |
636 | 636 |
|
637 | 637 | const rowHolderDisplay = this.row_holder.style.display |
@@ -742,17 +742,9 @@ export class ArrayEditor extends AbstractEditor { |
742 | 742 | this.controls.appendChild(this.remove_all_rows_button) |
743 | 743 |
|
744 | 744 | if (this.tabs) { |
745 | | - this.add_row_button.style.width = '100%' |
746 | | - this.add_row_button.style.textAlign = 'left' |
747 | | - this.add_row_button.style.marginBottom = '3px' |
748 | | - |
749 | | - this.delete_last_row_button.style.width = '100%' |
750 | | - this.delete_last_row_button.style.textAlign = 'left' |
751 | | - this.delete_last_row_button.style.marginBottom = '3px' |
752 | | - |
753 | | - this.remove_all_rows_button.style.width = '100%' |
754 | | - this.remove_all_rows_button.style.textAlign = 'left' |
755 | | - this.remove_all_rows_button.style.marginBottom = '3px' |
| 745 | + this.add_row_button.classList.add('je-array-control-btn') |
| 746 | + this.delete_last_row_button.classList.add('je-array-control-btn') |
| 747 | + this.remove_all_rows_button.classList.add('je-array-control-btn') |
756 | 748 | } |
757 | 749 | } |
758 | 750 |
|
@@ -788,3 +780,4 @@ export class ArrayEditor extends AbstractEditor { |
788 | 780 | ) |
789 | 781 | } |
790 | 782 | } |
| 783 | +ArrayEditor.rules = rules |
0 commit comments