Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

storyblok-react

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storyblok-react - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

4

lib/sb-editable.d.ts

@@ -11,5 +11,7 @@ import React from 'react'

}
declare class SbEditable extends React.Component<SbEditableProps, {}> {
declare class SbEditable extends React.PureComponent<SbEditableProps, {}> {
constructor(props: SbEditableProps)
componentDidMount(): void
componentDidUpdate(): void
addPropsOnChildren(): void
addClass(el: HTMLElement, className: string): void

@@ -16,0 +18,0 @@ render(): React.ReactNode

@@ -25,4 +25,4 @@ 'use strict';

var SbEditable = function (_React$Component) {
_inherits(SbEditable, _React$Component);
var SbEditable = function (_React$PureComponent) {
_inherits(SbEditable, _React$PureComponent);

@@ -38,2 +38,12 @@ function SbEditable(props) {

value: function componentDidMount() {
this.addPropsOnChildren();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this.addPropsOnChildren();
}
}, {
key: 'addPropsOnChildren',
value: function addPropsOnChildren() {
if (typeof this.props.content._editable === 'undefined' || window.location === window.parent.location) {

@@ -72,4 +82,4 @@ return;

return SbEditable;
}(_react2.default.Component);
}(_react2.default.PureComponent);
exports.default = SbEditable;
{
"name": "storyblok-react",
"version": "0.1.1",
"version": "0.1.2",
"description": "React component for storyblok.",

@@ -5,0 +5,0 @@ "keywords": [

import React from 'react'
import ReactDOM from 'react-dom'
class SbEditable extends React.Component {
class SbEditable extends React.PureComponent {
constructor(props) {

@@ -10,2 +10,10 @@ super(props)

componentDidMount() {
this.addPropsOnChildren()
}
componentDidUpdate() {
this.addPropsOnChildren()
}
addPropsOnChildren() {
if (typeof this.props.content._editable === 'undefined' ||

@@ -16,4 +24,4 @@ window.location === window.parent.location) {

var el = ReactDOM.findDOMNode(this)
var options = JSON.parse(this.props.content._editable.replace(/^<!--#storyblok#/, '').replace(/-->$/, ''))
const el = ReactDOM.findDOMNode(this)
const options = JSON.parse(this.props.content._editable.replace(/^<!--#storyblok#/, '').replace(/-->$/, ''))

@@ -20,0 +28,0 @@ if (el instanceof Object && typeof el.setAttribute === 'function') {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc