mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 07:38:53 +02:00
chore(react): clean up
This commit is contained in:
parent
f8b563704f
commit
04913394c6
@ -9,6 +9,7 @@ import ReactBasicWidget from "../react/ReactBasicWidget.js";
|
|||||||
import froca from "../../services/froca.js";
|
import froca from "../../services/froca.js";
|
||||||
import tree from "../../services/tree.js";
|
import tree from "../../services/tree.js";
|
||||||
import FBranch from "../../entities/fbranch.js";
|
import FBranch from "../../entities/fbranch.js";
|
||||||
|
import Button from "../react/Button.jsx";
|
||||||
|
|
||||||
interface BranchPrefixDialogProps {
|
interface BranchPrefixDialogProps {
|
||||||
branch?: FBranch;
|
branch?: FBranch;
|
||||||
@ -35,7 +36,7 @@ function BranchPrefixDialogComponent({ branch }: BranchPrefixDialogProps) {
|
|||||||
onShown={() => branchInput.current?.focus()}
|
onShown={() => branchInput.current?.focus()}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
helpPageId="TBwsyfadTA18"
|
helpPageId="TBwsyfadTA18"
|
||||||
footer={<button class="btn btn-primary btn-sm">{t("branch_prefix.save")}</button>}
|
footer={<Button text={t("branch_prefix.save")} />}
|
||||||
>
|
>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="branch-prefix-input">{t("branch_prefix.prefix")}</label>
|
<label for="branch-prefix-input">{t("branch_prefix.prefix")}</label>
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { useEffect, useRef } from "preact/hooks";
|
import { useRef } from "preact/hooks";
|
||||||
import shortcuts from "../../services/shortcuts";
|
|
||||||
|
|
||||||
interface ButtonProps {
|
interface ButtonProps {
|
||||||
text: string;
|
text: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
keyboardShortcut?: string;
|
keyboardShortcut?: string;
|
||||||
onClick: () => void;
|
onClick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Button({ className, text, onClick, keyboardShortcut }: ButtonProps) {
|
export default function Button({ className, text, onClick, keyboardShortcut }: ButtonProps) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user