You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with this module, drupal-attributes, twing, and storybook... but I'm having the darndest time getting attributes.addClass('foo') to print at all. I'm assuming the problem is how I'm calling drupal-attribute... I found this old comment here: ericmorand/drupal-attribute#12 (comment) that mentions the glue to make it work also exists in this module now.
relevant bits of package.json (initially ran npx sb init -t html)
<div>
<h2>I'm a block!</h2>
Lorem ipsum dolor sit amet.
</div>
If I change how I create the attributes in Block.args, to use Attribute from import Attribute from 'drupal-twig-extensions/twing' instead of drupalAttributes, I get a constructor error. Without the constructor, nothing happens... I feel like the solution's right there, but I'm missing something obvious. Any pointers or existing documentation I've missed would be greatly appreciated.
Block.args = {
attributes: new Attribute(),
title_attributes: new Attribute(),
Hello, and thanks for the lovely module.
I'm working with this module, drupal-attributes, twing, and storybook... but I'm having the darndest time getting attributes.addClass('foo') to print at all. I'm assuming the problem is how I'm calling drupal-attribute... I found this old comment here: ericmorand/drupal-attribute#12 (comment) that mentions the glue to make it work also exists in this module now.
relevant bits of package.json (initially ran
npx sb init -t html
)main.js
twing-environment.js
block.stories.js
block.twig (identical to block.html.twig in drupal)
output is:
If I change how I create the attributes in
Block.args
, to useAttribute
fromimport Attribute from 'drupal-twig-extensions/twing'
instead ofdrupalAttributes
, I get a constructor error. Without the constructor, nothing happens... I feel like the solution's right there, but I'm missing something obvious. Any pointers or existing documentation I've missed would be greatly appreciated.The text was updated successfully, but these errors were encountered: