fix export format state
This commit is contained in:
parent
4d2936627c
commit
78746938b7
1 changed files with 4 additions and 3 deletions
|
|
@ -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" }}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue