* feat: add widget definition system * fix: wrong typecheck command in turbo generator * chore: fix formatting * feat: add widget preview page * chore: fix formatting and type errors * chore: fix from widget edit modal and remove some never casts * chore: address pull request feedback
16 lines
401 B
TypeScript
16 lines
401 B
TypeScript
import { IconCloud } from "@homarr/ui";
|
|
|
|
import { createWidgetDefinition } from "../definition";
|
|
import { opt } from "../options";
|
|
|
|
export const { definition, componentLoader } = createWidgetDefinition(
|
|
"weather",
|
|
{
|
|
icon: IconCloud,
|
|
options: opt.from((fac) => ({
|
|
location: fac.location(),
|
|
showCity: fac.switch(),
|
|
})),
|
|
},
|
|
).withDynamicImport(() => import("./component"));
|