@plasmicpkgs/react-scroll-parallax
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -0,1 +1,2 @@ | ||
/// <reference types="react" /> | ||
export interface ParallaxWrapperProps { | ||
@@ -2,0 +3,0 @@ xStart?: string; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var registerComponent = _interopDefault(require('@plasmicapp/host/registerComponent')); | ||
var loaderNextjs = require('@plasmicapp/loader-nextjs'); | ||
var host = require('@plasmicapp/host'); | ||
var React = require('react'); | ||
@@ -23,3 +23,3 @@ var React__default = _interopDefault(React); | ||
previewInEditor = _ref.previewInEditor; | ||
var inEditor = React.useContext(loaderNextjs.PlasmicCanvasContext); | ||
var inEditor = React.useContext(host.PlasmicCanvasContext); | ||
return React__default.createElement(reactScrollParallax.Parallax, { | ||
@@ -26,0 +26,0 @@ disabled: disabled || inEditor && !previewInEditor, |
@@ -1,2 +0,2 @@ | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@plasmicapp/host/registerComponent")),a=require("@plasmicapp/loader-nextjs"),r=require("react"),i=e(r),l=require("react-scroll-parallax");t((function(e){var t=e.xStart,o=void 0===t?"0":t,n=e.xEnd,s=void 0===n?"0":n,p=e.yStart,d=void 0===p?"0":p,c=e.yEnd,u=void 0===c?"0":c,f=e.disabled,h=e.previewInEditor,x=r.useContext(a.PlasmicCanvasContext);return i.createElement(l.Parallax,{disabled:f||x&&!h,x:[o,s],y:[d,u]})}),{name:"Parallax",importPath:"@plasmicpkgs/react-scroll-parallax/ParallaxWrapper",props:{children:"slot",yStart:{type:"string",defaultValue:"-50%",description:"The vertical offset at the start (when just scrolling into view). Can be % or px."},yEnd:{type:"string",defaultValue:"50%",description:"The vertical offset at the end (when just scrolling out of view). Can be % or px."},xStart:{type:"string",defaultValue:"50%",description:"The horizontal offset at the start (when just scrolling into view). Can be % or px."},xEnd:{type:"string",defaultValue:"-50%",description:"The horizontal offset at the end (when just scrolling out of view). Can be % or px."},disabled:{type:"boolean",description:"Disables the parallax effect."},previewInEditor:{type:"boolean",description:"Enable the parallax effect in the editor."}},isDefaultExport:!0,defaultStyles:{maxWidth:"100%"}}); | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@plasmicapp/host/registerComponent")),a=require("@plasmicapp/host"),r=require("react"),i=e(r),l=require("react-scroll-parallax");t((function(e){var t=e.xStart,o=void 0===t?"0":t,n=e.xEnd,s=void 0===n?"0":n,p=e.yStart,d=void 0===p?"0":p,c=e.yEnd,u=void 0===c?"0":c,f=e.disabled,h=e.previewInEditor,x=r.useContext(a.PlasmicCanvasContext);return i.createElement(l.Parallax,{disabled:f||x&&!h,x:[o,s],y:[d,u]})}),{name:"Parallax",importPath:"@plasmicpkgs/react-scroll-parallax/ParallaxWrapper",props:{children:"slot",yStart:{type:"string",defaultValue:"-50%",description:"The vertical offset at the start (when just scrolling into view). Can be % or px."},yEnd:{type:"string",defaultValue:"50%",description:"The vertical offset at the end (when just scrolling out of view). Can be % or px."},xStart:{type:"string",defaultValue:"50%",description:"The horizontal offset at the start (when just scrolling into view). Can be % or px."},xEnd:{type:"string",defaultValue:"-50%",description:"The horizontal offset at the end (when just scrolling out of view). Can be % or px."},disabled:{type:"boolean",description:"Disables the parallax effect."},previewInEditor:{type:"boolean",description:"Enable the parallax effect in the editor."}},isDefaultExport:!0,defaultStyles:{maxWidth:"100%"}}); | ||
//# sourceMappingURL=react-scroll-parallax.cjs.production.min.js.map |
import registerComponent from '@plasmicapp/host/registerComponent'; | ||
import { PlasmicCanvasContext } from '@plasmicapp/loader-nextjs'; | ||
import { PlasmicCanvasContext } from '@plasmicapp/host'; | ||
import React, { useContext } from 'react'; | ||
@@ -4,0 +4,0 @@ import { Parallax } from 'react-scroll-parallax'; |
{ | ||
"name": "@plasmicpkgs/react-scroll-parallax", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Plasmic registration call for the HTML5 video element", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var registerComponent = require('@plasmicapp/host/registerComponent'); | ||
var loaderNextjs = require('@plasmicapp/loader-nextjs'); | ||
var host = require('@plasmicapp/host'); | ||
var React = require('react'); | ||
@@ -18,3 +18,3 @@ var reactScrollParallax = require('react-scroll-parallax'); | ||
var _b = _a.xStart, xStart = _b === void 0 ? "0" : _b, _c = _a.xEnd, xEnd = _c === void 0 ? "0" : _c, _d = _a.yStart, yStart = _d === void 0 ? "0" : _d, _e = _a.yEnd, yEnd = _e === void 0 ? "0" : _e, disabled = _a.disabled, previewInEditor = _a.previewInEditor; | ||
var inEditor = React.useContext(loaderNextjs.PlasmicCanvasContext); | ||
var inEditor = React.useContext(host.PlasmicCanvasContext); | ||
return (React__default["default"].createElement(reactScrollParallax.Parallax, { disabled: disabled || (inEditor && !previewInEditor), x: [xStart, xEnd], y: [yStart, yEnd] })); | ||
@@ -21,0 +21,0 @@ } |
import registerComponent from '@plasmicapp/host/registerComponent'; | ||
import { PlasmicCanvasContext } from '@plasmicapp/loader-nextjs'; | ||
import { PlasmicCanvasContext } from '@plasmicapp/host'; | ||
import React, { useContext } from 'react'; | ||
@@ -4,0 +4,0 @@ import { Parallax } from 'react-scroll-parallax'; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="react" /> | ||
export interface ParallaxWrapperProps { | ||
@@ -2,0 +3,0 @@ xStart?: string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
266
30010