mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
feat(ui): back-to-library, export-only download button, save in book setup
This commit is contained in:
1 parent
686c7768c7
commit
e9669290ec
3 files changed
+30
-13
No files matched your search
@@ -28,12 +28,14 @@ function Field({ label, children }: { label: string; children: ReactNode }) {
|
||||
);
|
||||
}
|
||||
|
||||
export function Settings({ onClose }: { onClose: () => void }) {
|
||||
const metadata = useBook((s) => s.book.metadata);
|
||||
const settings = useBook((s) => s.book.settings);
|
||||
export function Settings({ onClose, onSave }: { onClose: () => void; onSave: () => void }) {
|
||||
const book = useBook((s) => s.book);
|
||||
const setMetadata = useBook((s) => s.setMetadata);
|
||||
const setSettings = useBook((s) => s.setSettings);
|
||||
|
||||
if (!book) return null;
|
||||
const { metadata, settings } = book;
|
||||
|
||||
return (
|
||||
<div className="overlay" onClick={onClose}>
|
||||
<div className="panel" onClick={(e) => e.stopPropagation()}>
|
||||
@@ -81,6 +83,17 @@ export function Settings({ onClose }: { onClose: () => void }) {
|
||||
Add bleed for full-page images (print)
|
||||
</label>
|
||||
</div>
|
||||
<div className="panel-foot">
|
||||
<button
|
||||
className="btn-primary"
|
||||
onClick={() => {
|
||||
onSave();
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user