Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { pluginFactories } from '@react-page/plugins-slate';
import React from 'react';
export default pluginFactories.createComponentPlugin<{
color: string;
}>({
addHoverButton: true,
addToolbarButton: true,
type: 'SetColor',
object: 'mark',
icon: <span>Color</span>,
Component: props => {
return (
<span style="{{">{props.children}</span>
);
},
schema: {
type: 'object',
required: ['color'],