mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 11:07:04 +00:00
refactor(settings): drop trim field, now set from preview panel
This commit is contained in:
1 parent
3202f24947
commit
d684abbdef
1 file changed
-19
@@ -1,15 +1,7 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { useBook } from "../store/useBook";
|
||||
import type { TrimSize } from "../model/book";
|
||||
import { Icon } from "./Icon";
|
||||
|
||||
const TRIMS: { value: TrimSize; label: string }[] = [
|
||||
{ value: "6x9", label: "6 × 9 in — trade paperback" },
|
||||
{ value: "5.5x8.5", label: "5.5 × 8.5 in — digest" },
|
||||
{ value: "5x8", label: "5 × 8 in — pocket" },
|
||||
{ value: "a5", label: "A5 — 148 × 210 mm" },
|
||||
];
|
||||
|
||||
const LANGUAGES = [
|
||||
{ value: "en", label: "English" },
|
||||
{ value: "es", label: "Spanish" },
|
||||
@@ -58,16 +50,6 @@ export function Settings({ onClose, onSave }: { onClose: () => void; onSave: ()
|
||||
<Field label="ISBN">
|
||||
<input value={metadata.isbn} placeholder="optional" onChange={(e) => setMetadata({ isbn: e.target.value })} />
|
||||
</Field>
|
||||
<div className="field-row">
|
||||
<Field label="Trim size">
|
||||
<select value={settings.trim} onChange={(e) => setSettings({ trim: e.target.value as TrimSize })}>
|
||||
{TRIMS.map((t) => (
|
||||
<option key={t.value} value={t.value}>
|
||||
{t.label}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</Field>
|
||||
<Field label="Language">
|
||||
<select value={metadata.language} onChange={(e) => setMetadata({ language: e.target.value })}>
|
||||
{LANGUAGES.map((l) => (
|
||||
@@ -77,7 +59,6 @@ export function Settings({ onClose, onSave }: { onClose: () => void; onSave: ()
|
||||
))}
|
||||
</select>
|
||||
</Field>
|
||||
</div>
|
||||
<label className="check">
|
||||
<input type="checkbox" checked={settings.bleed} onChange={(e) => setSettings({ bleed: e.target.checked })} />
|
||||
Add bleed for full-page images (print)
|
||||
|
||||
Reference in new issue
Block a user