Skip to content

Commit

Permalink
Merge pull request #33 from kanaihyakumar/master
Browse files Browse the repository at this point in the history
Update styles.ts to make it compatible with latest grapesjs version package
  • Loading branch information
artf authored Oct 7, 2023
2 parents 97c9585 + 07e37a5 commit f1ca643
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grapesjs-style-gradient",
"version": "3.0.1",
"version": "3.0.2",
"description": "Add gradient input to the Style Manager in GrapesJS",
"main": "dist/index.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type grapesjs from 'grapesjs';
import { Plugin } from 'grapesjs';
import loadStyles from './styles';

export { parseGradient, toGradient, getValidDir, GRAD_DIRS, GRAD_TYPES } from './styles';
Expand Down Expand Up @@ -39,7 +39,7 @@ export type PluginOptions = {
builtInType?: string | false,
};

const plugin: grapesjs.Plugin<PluginOptions> = (editor, opts = {}) => {
const plugin: Plugin = (editor, opts = {}) => {
const options: PluginOptions = {
grapickOpts: {},
selectEdgeStops: true,
Expand Down
4 changes: 2 additions & 2 deletions src/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type grapesjs from 'grapesjs';
import { Editor } from 'grapesjs';
// @ts-ignore
import Grapick from 'grapick';
import { PluginOptions } from '.';
Expand Down Expand Up @@ -102,7 +102,7 @@ const PROP_GRADIENT = 'background-image-gradient';
const PROP_DIR = `${PROP_GRADIENT}-dir`;
const PROP_TYPE = `${PROP_GRADIENT}-type`;

export default (editor: grapesjs.Editor, config: PluginOptions = {}) => {
export default (editor: Editor, config: PluginOptions = {}) => {
// @ts-ignore
const em = editor.getModel();
const { Styles } = editor;
Expand Down

0 comments on commit f1ca643

Please sign in to comment.