storybook-eol/react-treebeard

how to use container decorator ?

Closed this issue · 7 comments

I have no clue what to put in the props, any help ?

Hi @MichaelDeBoey, I agree with @radjivF .
I use this project as library.

But the example is too difficult to use.
If this project is not died, please let us the easy way to use decorators.
Please tell me how the same results come out as an example by using only decorators.
like this:

const decorators = { ... };

<Treebeard
    data={this.state.tData}
    onToggle={this.onToggle}
    decorators={decorators}
/>

@wuweiweiwu
Could you let me know how to use it? Please.
I didn't know how to use decorator.
Even I saw the example code but that was imported the original code.
Do I have to import whole code of this repository, if I wanna use decorator?

hi @Jongkeun do you mean this?

Decorators lets you specify your own loading, header, footer, etc components, the default is provided if you don't specify the prop (no action needed on your part) but if you do want to customize those components you'll have to specify a decorator prop

You do not have to import the whole code of the repository, hope that helps!

@wuweiweiwu
Thanks. I am going to try.

@Jongkeun Were you able to figure this out ?

@codecoffemusic Sorry I'm late.
And nope. I gave up :(