mirror of
https://github.com/zigholding/obsidian-notesync-plugin.git
synced 2026-07-22 05:43:30 +00:00
move all styles into CSS
This commit is contained in:
parent
2e8ec42a1f
commit
8237e1ab16
2 changed files with 17 additions and 8 deletions
|
|
@ -70,8 +70,7 @@ export default class InputPrompt extends Modal {
|
|||
value?: string
|
||||
) {
|
||||
const textComponent = new TextComponent(container);
|
||||
|
||||
(textComponent as any).inputEl.style.width = "100%";
|
||||
(textComponent as any).inputEl.classList.add("input-field");
|
||||
(textComponent as any)
|
||||
.setPlaceholder(placeholder ?? "")
|
||||
.setValue(value ?? "")
|
||||
|
|
@ -99,18 +98,15 @@ export default class InputPrompt extends Modal {
|
|||
buttonBarContainer,
|
||||
"Ok",
|
||||
this.submitClickCallback
|
||||
).setCta().buttonEl.style.marginRight = "0";
|
||||
).setCta();
|
||||
this.createButton(
|
||||
buttonBarContainer,
|
||||
"Cancel",
|
||||
this.cancelClickCallback
|
||||
);
|
||||
|
||||
buttonBarContainer.style.display = "flex";
|
||||
buttonBarContainer.style.flexDirection = "row-reverse";
|
||||
buttonBarContainer.style.justifyContent = "flex-start";
|
||||
buttonBarContainer.style.marginTop = "1rem";
|
||||
buttonBarContainer.style.gap = "0.5rem";
|
||||
buttonBarContainer.classList.add("button-bar");
|
||||
|
||||
}
|
||||
|
||||
private submitClickCallback = (evt: MouseEvent) => this.submit();
|
||||
|
|
|
|||
13
styles.css
Normal file
13
styles.css
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* 按钮条样式 */
|
||||
.button-bar {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
justify-content: flex-start;
|
||||
margin-top: 1rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
/* 输入字段样式 */
|
||||
.input-field {
|
||||
width: 100%;
|
||||
}
|
||||
Loading…
Reference in a new issue