diff --git a/src/block-components/custom-css/index.js b/src/block-components/custom-css/index.js
index d34494ea66..17a0d63dc3 100644
--- a/src/block-components/custom-css/index.js
+++ b/src/block-components/custom-css/index.js
@@ -1,10 +1,29 @@
import { addAttributes } from './attributes'
import { Edit } from './edit'
+import { useBlockAttributesContext } from '~stackable/hooks'
import { applyFilters } from '@wordpress/hooks'
+// Keep existing Premium Custom CSS working when Premium is deactivated.
+const CustomCSSStyle = props => {
+ const { css, isSaveContent } = props
+
+ return !! css &&
+}
+
+CustomCSSStyle.defaultProps = {
+ css: '',
+ isSaveContent: false,
+}
+
export const CustomCSS = props => {
- return applyFilters( 'stackable.block-component.custom-css', null, props )
+ const customCSSMinified = useBlockAttributesContext( attributes => attributes.customCSSMinified )
+
+ return applyFilters(
+ 'stackable.block-component.custom-css',
+ ,
+ props
+ )
}
CustomCSS.defaultProps = {
@@ -12,7 +31,11 @@ CustomCSS.defaultProps = {
}
CustomCSS.Content = props => {
- return applyFilters( 'stackable.block-component.custom-css.content', null, props )
+ return applyFilters(
+ 'stackable.block-component.custom-css.content',
+ ,
+ props
+ )
}
CustomCSS.Content.defaultProps = {