* fix: nextjs slow compile time * fix: change optimized package imports and transpile packages * fix: format issue
31 lines
837 B
TypeScript
31 lines
837 B
TypeScript
import { IconNotes } from "@tabler/icons-react";
|
|
|
|
import { createWidgetDefinition } from "../definition";
|
|
import { optionsBuilder } from "../options";
|
|
import { defaultContent } from "./default-content";
|
|
|
|
export const { definition, componentLoader } = createWidgetDefinition(
|
|
"notebook",
|
|
{
|
|
icon: IconNotes,
|
|
options: optionsBuilder.from(
|
|
(factory) => ({
|
|
showToolbar: factory.switch({
|
|
defaultValue: true,
|
|
}),
|
|
allowReadOnlyCheck: factory.switch({
|
|
defaultValue: true,
|
|
}),
|
|
content: factory.text({
|
|
defaultValue: defaultContent,
|
|
}),
|
|
}),
|
|
{
|
|
content: {
|
|
shouldHide: () => true, // Hide the content option as it can be modified in the editor
|
|
},
|
|
},
|
|
),
|
|
},
|
|
).withDynamicImport(() => import("./component"));
|