@titelmedia/bricks-images
Advanced tools
Comparing version 1.11.5 to 1.11.9
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.11.9](https://github.com/titel-media/bricks-lerna/compare/v1.11.8...v1.11.9) (2023-05-03) | ||
### Bug Fixes | ||
- updated matchMedia to reference breakpoints - images component ([aabf0d2](https://github.com/titel-media/bricks-lerna/commit/aabf0d28c61d750ef962c07720f76cc6c6f14f22)) | ||
- updated media to const ([42f782b](https://github.com/titel-media/bricks-lerna/commit/42f782bc9d688801c7e3d239a27d29b5b53b70d0)) | ||
### Features | ||
- added parallax effect to images component ([770d4ad](https://github.com/titel-media/bricks-lerna/commit/770d4adc8de3b331f397973c54f4647e3460ac43)) | ||
## [1.11.5](https://github.com/titel-media/bricks-lerna/compare/v1.11.4...v1.11.5) (2023-04-27) | ||
@@ -8,0 +19,0 @@ |
@@ -9,2 +9,3 @@ "use strict"; | ||
var _styles = require("./styles"); | ||
var _breakpoints = require("@titelmedia/bricks-theme/lib/variables/breakpoints"); | ||
var _bricksUtils = require("@titelmedia/bricks-utils"); | ||
@@ -23,2 +24,4 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
link, | ||
parallax, | ||
parallaxNumber, | ||
imagePosition, | ||
@@ -47,2 +50,12 @@ imageAlignment, | ||
} | ||
if (parallax) { | ||
const media = _bricksUtils.gsap.matchMedia(); | ||
media.add(`(min-width: ${_breakpoints.BREAKPOINTS.sm}px)`, () => { | ||
let number = parallaxNumber ? parallaxNumber : 5; | ||
_bricksUtils.gsap.effects.parallax(imageRef.current, { | ||
yPercent: number, | ||
trigger: imageRef.current | ||
}); | ||
}); | ||
} | ||
}, []); | ||
@@ -49,0 +62,0 @@ function Link({ |
@@ -11,2 +11,3 @@ import React, { useEffect, useRef, forwardRef } from 'react'; | ||
} from './styles'; | ||
import { BREAKPOINTS } from '@titelmedia/bricks-theme/lib/variables/breakpoints'; | ||
import { gsap } from '@titelmedia/bricks-utils'; | ||
@@ -22,2 +23,4 @@ | ||
link, | ||
parallax, | ||
parallaxNumber, | ||
imagePosition, | ||
@@ -48,2 +51,12 @@ imageAlignment, | ||
} | ||
if (parallax) { | ||
const media = gsap.matchMedia(); | ||
media.add(`(min-width: ${BREAKPOINTS.sm}px)`, () => { | ||
let number = parallaxNumber ? parallaxNumber : 5; | ||
gsap.effects.parallax(imageRef.current, { | ||
yPercent: number, | ||
trigger: imageRef.current, | ||
}); | ||
}); | ||
} | ||
}, []); | ||
@@ -50,0 +63,0 @@ |
{ | ||
"name": "@titelmedia/bricks-images", | ||
"version": "1.11.5", | ||
"version": "1.11.9", | ||
"description": "> TODO: description", | ||
@@ -31,3 +31,3 @@ "author": "Katerina Vaseva <katerina.vsv@gmail.com>", | ||
}, | ||
"gitHead": "357b0789210f8b4f6b8f3afa42d9ac7b510179ae" | ||
"gitHead": "88c75a2644390b39c8bdac6e953425170e353272" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57946
611
1