chrisvxd / story2sketch

Convert Storybook into Sketch symbols 💎
Other
402 stars 32 forks source link

`querySelector` dept #57

Closed uxdxdev closed 5 years ago

uxdxdev commented 5 years ago

Just playing around with this and I dont think the querySelector works as expected.

Using

  querySelector: '#root div div',

Only selects '#root div', I'll do more testing...

uxdxdev commented 5 years ago

Maybe its just my understanding of the querySelector so what I want do is only output whats inside the #root div div to sketch, but instead its outputting everything under #root wether I use #root div div or #root

uxdxdev commented 5 years ago
module.exports = {
  output: 'docs/react.asketch.json',
  input: 'docs/iframe.html',
  pageTitle: 'Stories',
  querySelector: '#root div div',
  verbose: true,
  stories: [
    {
      kind: 'Components/Card',
      stories: [
        {
          name: 'Card',
        },
      ],
    },
  ],
};

Getting

screenshot 2018-12-11 at 10 59 54

Based on the above config #root div div the Sketch output includes the Implementation text, but this is not inside #root div div.

screenshot 2018-12-11 at 11 02 07
chrisvxd commented 5 years ago

@damorton I don't think you're misinterpreting the querySelector functionality, but I'm struggling to reproduce.

Is it possible to get access to your source to investigate? If not, would you be able to provide me with a code snippet of your story so I can attempt to reproduce?

chrisvxd commented 5 years ago

@beautifwhale updating comment handle because I think you renamed.