MCPcopy Create free account
hub / github.com/chhoumann/quickadd / createButtonBar

Method createButtonBar

src/gui/MathModal.ts:123–144  ·  view source on GitHub ↗
(mainContentContainer: HTMLDivElement)

Source from the content-addressed store, hash-verified

121 }
122
123 private createButtonBar(mainContentContainer: HTMLDivElement) {
124 const buttonBarContainer: HTMLDivElement =
125 mainContentContainer.createDiv();
126 this.createButton(
127 buttonBarContainer,
128 "Ok",
129 this.submitClickCallback
130 ).setCta().buttonEl.setCssStyles({ marginRight: "0" });
131 this.createButton(
132 buttonBarContainer,
133 "Cancel",
134 this.cancelClickCallback
135 );
136
137 buttonBarContainer.setCssStyles({
138 display: "flex",
139 flexDirection: "row-reverse",
140 justifyContent: "flex-start",
141 marginTop: "1rem",
142 gap: "0.5rem",
143 });
144 }
145
146 private submitClickCallback = (evt: MouseEvent) => this.submit();
147 private cancelClickCallback = (evt: MouseEvent) => this.cancel();

Callers 1

displayMethod · 0.95

Calls 2

createButtonMethod · 0.95
setCtaMethod · 0.45

Tested by

no test coverage detected