mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 17:00:54 +01:00
24 lines
779 B
TypeScript
24 lines
779 B
TypeScript
import { IconBrowser } from "@tabler/icons-react";
|
|
|
|
import { createWidgetDefinition } from "../definition";
|
|
import { optionsBuilder } from "../options";
|
|
|
|
export const { definition, componentLoader } = createWidgetDefinition("iframe", {
|
|
icon: IconBrowser,
|
|
createOptions() {
|
|
return optionsBuilder.from((factory) => ({
|
|
embedUrl: factory.text(),
|
|
allowFullScreen: factory.switch(),
|
|
allowScrolling: factory.switch({
|
|
defaultValue: true,
|
|
}),
|
|
allowTransparency: factory.switch(),
|
|
allowPayment: factory.switch(),
|
|
allowAutoPlay: factory.switch(),
|
|
allowMicrophone: factory.switch(),
|
|
allowCamera: factory.switch(),
|
|
allowGeolocation: factory.switch(),
|
|
}));
|
|
},
|
|
}).withDynamicImport(() => import("./component"));
|