TDD,E2E 개선, 미적용 스타일 개선
CI / test (push) Failing after 2m54s
CI / e2e (push) Has been skipped
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-12-07 09:52:42 +09:00
parent e726f43f7c
commit a5b432fb7b
167 changed files with 7397 additions and 663 deletions
+27 -1
View File
@@ -21,7 +21,33 @@ export const computeDividerExportTokens = (
const marginY = typeof props.marginYPx === "number" && props.marginYPx > 0 ? props.marginYPx : 16;
const marginEm = pxToEm(marginY);
const style = `border:0;border-bottom:${thickness} solid ${escapeAttr(color)};margin:${marginEm} 0;`;
const widthMode = props.widthMode ?? "full";
const align = props.align ?? "left";
const styleParts: string[] = [];
styleParts.push("border:0");
styleParts.push(`border-bottom:${thickness} solid ${escapeAttr(color)}`);
styleParts.push(`margin:${marginEm} 0`);
if (widthMode === "auto") {
styleParts.push("width:50%");
} else if (widthMode === "fixed") {
const widthPx =
typeof props.widthPx === "number" && props.widthPx > 0 ? props.widthPx : 320;
styleParts.push(`width:${pxToEm(widthPx)}`);
}
if (widthMode === "auto" || widthMode === "fixed") {
if (align === "center") {
styleParts.push("margin-left:auto");
styleParts.push("margin-right:auto");
} else if (align === "right") {
styleParts.push("margin-left:auto");
styleParts.push("margin-right:0");
}
}
const style = `${styleParts.join(";")};`;
return { style };
};