storybook-eol / react-treebeard

React Tree View Component. Data-Driven, Fast, Efficient and Customisable.
http://storybooks.github.io/react-treebeard
MIT License
1.69k stars 294 forks source link

Why use inline styles instead css classes? #52

Open witalobenicio opened 7 years ago

witalobenicio commented 7 years ago

It would be a lot easier to customize if it was using css classes instead of inline styles. This is a requirement or something? Or just it was not made with classes...because not?

cdtinney commented 7 years ago

+1

benmathes commented 7 years ago

+💯

otherwise we're stuck doing this:

    style.tree.base.backgroundColor = '';
    style.tree.base.color =  '';
    style.tree.node.activeLink.background = '';
    style.tree.node.loading.color = '';
    style.tree.node.header.base.color = '';
witalobenicio commented 7 years ago

Guys, I've end up implementing my own component using jstree lib. Soon I will let it available on npm.

kletkeman commented 5 years ago

+

otherwise we're stuck doing this:

    style.tree.base.backgroundColor = '';
    style.tree.base.color =  '';
    style.tree.node.activeLink.background = '';
    style.tree.node.loading.color = '';
    style.tree.node.header.base.color = '';

Considering that my entire system uses scss, I would take this over inline styles. I am struggling like crazy with the tree itself, which insists on remaining dark no matter what I do. And since it refuses to respond to scss, I have to go code diving now to figure out how to make the example display in white background and dark text.

I guess most people don't mind the opinionated nature of this component since it has gargantuan downloads for a component with fairly limited activity of late. But it's painful to have one "special" component with its own styles implementation.