File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -17,25 +17,23 @@ export class ConfirmOverwriteModal extends Modal {
17
17
contentEl . createEl ( 'h2' , { text : 'File already exists' } ) ;
18
18
contentEl . createEl ( 'p' , { text : `The file "${ this . fileName } " already exists. Do you want to overwrite it?` } ) ;
19
19
20
- const buttonContainer = contentEl . createDiv ( { cls : 'modal-button-container ' } ) ;
20
+ contentEl . createDiv ( { cls : 'media-db-plugin-spacer ' } ) ;
21
21
22
- new Setting ( buttonContainer )
23
- . addButton ( btn => {
24
- btn . setButtonText ( 'Yes' ) ;
25
- btn . onClick ( ( ) => {
26
- this . result = true ;
27
- this . close ( ) ;
28
- } ) ;
29
- btn . buttonEl . addClass ( 'media-db-plugin-button' ) ;
30
- } )
31
- . addButton ( btn => {
32
- btn . setButtonText ( 'No' ) ;
33
- btn . onClick ( ( ) => {
34
- this . result = false ;
35
- this . close ( ) ;
36
- } ) ;
37
- btn . buttonEl . addClass ( 'media-db-plugin-button' ) ;
22
+ const bottomSettingRow = new Setting ( contentEl ) ;
23
+ bottomSettingRow . addButton ( btn => {
24
+ btn . setButtonText ( 'Cancel' ) ;
25
+ btn . onClick ( ( ) => this . close ( ) ) ;
26
+ btn . buttonEl . addClass ( 'media-db-plugin-button' ) ;
27
+ } ) ;
28
+ bottomSettingRow . addButton ( btn => {
29
+ btn . setButtonText ( 'Ok' ) ;
30
+ btn . setCta ( ) ;
31
+ btn . onClick ( ( ) => {
32
+ this . result = true ;
33
+ this . close ( ) ;
38
34
} ) ;
35
+ btn . buttonEl . addClass ( 'media-db-plugin-button' ) ;
36
+ } ) ;
39
37
}
40
38
41
39
onClose ( ) {
You can’t perform that action at this time.
0 commit comments