feat(M01): 쉬운 단가산출 시험 단추 + 빈 창 — EasyCalc 폴더 신설
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PSXsvyDxjNmufteN5bqmt
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/* =============================================================================
|
||||
* M01_EasyCalc_Entry.ts
|
||||
* 쉬운 단가산출 시험 길 — 들어가는 단추 + 빈 창(틀만). 이 폴더째 지워도 됨.
|
||||
* ========================================================================== */
|
||||
|
||||
import { currentLanguageIndex } from "@ui/ui_template_locale";
|
||||
import { createButton, el } from "@ui/ui_template_elements";
|
||||
import { openModal } from "@ui/ui_template_modal";
|
||||
import "./M01_EasyCalc_Style.css";
|
||||
|
||||
const TEXT = {
|
||||
Open: ["쉬운 단가산출(시험)", "Easy unit-price (trial)"],
|
||||
Title: ["쉬운 단가산출", "Easy unit-price"],
|
||||
Ready: ["준비 중", "Coming soon"],
|
||||
Close: ["닫기", "Close"],
|
||||
} as const;
|
||||
|
||||
const te = (key: keyof typeof TEXT): string => TEXT[key][currentLanguageIndex];
|
||||
|
||||
/** 「식으로 새로 만들기」 옆에 놓는 단추 — 누르면 빈 창 */
|
||||
export function createEasyCalcButton(): HTMLButtonElement {
|
||||
return createButton({
|
||||
label: te("Open"),
|
||||
variant: "filled",
|
||||
onClick: () =>
|
||||
openModal({
|
||||
title: te("Title"),
|
||||
closeLabel: te("Close"),
|
||||
mount: (body) =>
|
||||
body.append(el("p", { className: "m01-easycalc__ready", text: te("Ready") })),
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
.m01-easycalc__ready {
|
||||
margin: 0;
|
||||
padding: var(--spacing-16) 0;
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--text-body-sm);
|
||||
}
|
||||
Reference in New Issue
Block a user