mirror of
https://github.com/docmost/docmost.git
synced 2025-11-14 06:01:14 +10:00
fix export format state
This commit is contained in:
@ -56,7 +56,7 @@ export default function PageExportModal({
|
|||||||
<div>
|
<div>
|
||||||
<Text size="md">Format</Text>
|
<Text size="md">Format</Text>
|
||||||
</div>
|
</div>
|
||||||
<ExportFormatSelection onChange={handleChange} />
|
<ExportFormatSelection format={format} onChange={handleChange} />
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group justify="center" mt="md">
|
<Group justify="center" mt="md">
|
||||||
@ -72,16 +72,17 @@ export default function PageExportModal({
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ExportFormatSelection {
|
interface ExportFormatSelection {
|
||||||
|
format: ExportFormat;
|
||||||
onChange: (value: string) => void;
|
onChange: (value: string) => void;
|
||||||
}
|
}
|
||||||
function ExportFormatSelection({ onChange }: ExportFormatSelection) {
|
function ExportFormatSelection({ format, onChange }: ExportFormatSelection) {
|
||||||
return (
|
return (
|
||||||
<Select
|
<Select
|
||||||
data={[
|
data={[
|
||||||
{ value: "markdown", label: "Markdown" },
|
{ value: "markdown", label: "Markdown" },
|
||||||
{ value: "html", label: "HTML" },
|
{ value: "html", label: "HTML" },
|
||||||
]}
|
]}
|
||||||
defaultValue={ExportFormat.Markdown}
|
defaultValue={format}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
styles={{ wrapper: { maxWidth: 120 } }}
|
styles={{ wrapper: { maxWidth: 120 } }}
|
||||||
comboboxProps={{ width: "120" }}
|
comboboxProps={{ width: "120" }}
|
||||||
|
|||||||
Reference in New Issue
Block a user