storybook-addon-pseudo-states icon indicating copy to clipboard operation
storybook-addon-pseudo-states copied to clipboard

Support declarative shadow DOM

Open ghengeveld opened this issue 4 years ago • 2 comments

https://developer.chrome.com/blog/new-in-chrome-90/#declarative

ghengeveld avatar Apr 14 '21 19:04 ghengeveld

Pharos uses Lit to expose Web Components and I believe we're running into this as a limitation for the plugin working for us there. If y'all believe this plugin should work for Lit + @storybook/web-components generally, I'd also be interested to know so I can continue digging elsewhere!

daneah avatar Nov 29 '22 20:11 daneah

I am also interested.

Could this be allowed by passing a callback function returning the HTMLElement on which to edit the state ?

export const Hover: StoryObj = {
  parameters: {
    pseudo: {
      hover: () =>
        document
          .querySelector('my-element')
          ?.shadowRoot?.querySelector('#shadowButton'),
    },
  },
}

YannDuv avatar Jun 22 '23 13:06 YannDuv