diff --git a/docs/docs/customwidgets.mdx b/docs/docs/customwidgets.mdx index 44e6a95d0..fdef384a8 100644 --- a/docs/docs/customwidgets.mdx +++ b/docs/docs/customwidgets.mdx @@ -45,6 +45,7 @@ This `WidgetConfigType` is shared between all types of widgets. That is to say, | "color" | (optional) A string representing a color as would be used in CSS. Hex codes and custom CSS properties are included. This defaults to `"var(--secondary-text-color)"` which is a color wave uses for text that should be differentiated from other text. Out of the box, it is `"#c3c8c2"`. | | "label" | (optional) A string representing the label that appears underneath the widget. It will also act as a tooltip on hover if the `"description"` key isn't filled out. It is null by default. | | "description" | (optional) A description of what the widget does. If it is specified, this serves as a tooltip on hover. It is null by default. | +| "magnified" | (optional) A boolean indicating whether or not the widget should launch magnfied. It is false by default. | | "blockdef" | This is where the the non-visual portion of the widget is defined. Note that all further definition takes place inside a meta object inside this one. | diff --git a/frontend/app/workspace/workspace.tsx b/frontend/app/workspace/workspace.tsx index 12366c83c..626191581 100644 --- a/frontend/app/workspace/workspace.tsx +++ b/frontend/app/workspace/workspace.tsx @@ -71,17 +71,14 @@ const Widgets = memo(() => { ); }); -async function handleWidgetSelect(blockDef: BlockDef) { - createBlock(blockDef); +async function handleWidgetSelect(widget: WidgetConfigType) { + const blockDef = widget.blockdef; + createBlock(blockDef, widget.magnified); } const Widget = memo(({ widget }: { widget: WidgetConfigType }) => { return ( -