Skip to content

Instantly share code, notes, and snippets.

@ashikka
Created December 31, 2021 07:57
Show Gist options
  • Select an option

  • Save ashikka/2ae1053e10d028eb80235d79e77df618 to your computer and use it in GitHub Desktop.

Select an option

Save ashikka/2ae1053e10d028eb80235d79e77df618 to your computer and use it in GitHub Desktop.
import React from "react";
import "./styles.css";
import { PanelController } from "./controllers/PanelController.jsx";
import Unsplash from "./panels/Unsplash";
import { entrypoints } from "uxp";
const unsplashController = new PanelController(() => <Unsplash />, {
id: "unsplashController",
menuItems: [
{
id: "reload1",
label: "Reload Plugin",
enabled: true,
checked: false,
oninvoke: () => location.reload(),
},
],
});
entrypoints.setup({
plugin: {
create(plugin) {
/*optional */ console.log("created", plugin);
},
destroy() {
/*optional */ console.log("destroyed");
},
},
panels: {
unsplashController: unsplashController,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment