sous-components-twig
Advanced tools
Comparing version 0.0.19 to 0.0.20
import React from 'react'; | ||
import { useEffect } from '@storybook/client-api'; | ||
// Global Data | ||
import globalData from '../../_global-data/images.yml'; | ||
import globalDataImages from '../../_global-data/images.yml'; | ||
@@ -37,3 +37,3 @@ import image from './image/responsive-image.twig'; | ||
className="cl-example" | ||
dangerouslySetInnerHTML={{ __html: bgImageTwig(globalData) }} | ||
dangerouslySetInnerHTML={{ __html: bgImageTwig(globalDataImages) }} | ||
/> | ||
@@ -49,3 +49,3 @@ ); | ||
dangerouslySetInnerHTML={{ | ||
__html: bgImageTwig({ ...globalData, ...bgImageContent }), | ||
__html: bgImageTwig({ ...globalDataImages, ...bgImageContent }), | ||
}} | ||
@@ -52,0 +52,0 @@ /> |
import React from 'react'; | ||
import { useEffect } from '@storybook/client-api'; | ||
// Global Data | ||
import globalDataImages from '../../_global-data/images.yml'; | ||
@@ -12,4 +15,11 @@ import heroTwig from './hero.twig'; | ||
export const hero = () => ( | ||
<div dangerouslySetInnerHTML={{ __html: heroTwig(heroData) }} /> | ||
); | ||
export const hero = () => { | ||
useEffect(() => Drupal.attachBehaviors(), []); | ||
return ( | ||
<div | ||
dangerouslySetInnerHTML={{ | ||
__html: heroTwig({ ...globalDataImages, ...heroData }), | ||
}} | ||
/> | ||
); | ||
}; |
{ | ||
"name": "sous-components-twig", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"description": "Twig components for a fictitious Sous install", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
466832
622