Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as plugins from '@wordpress/plugins';
plugins.registerPlugin('my-plugin', {
icon: 'welcome-learn-more',
render: () => <h1>Hello World</h1>,
});
plugins.getPlugins();
plugins.getPlugin('my-plugin');
plugins.unregisterPlugin('my-plugin');
interface OwnProps {
foobar: number;
}
interface ContextProps {
iconName: string;
}
type Props = OwnProps & ContextProps;
const Foo = ({ iconName, foobar }: Props) => (