b-zurg/react-collapse-pane

Pane specific classes

furgin opened this issue · 2 comments

I'd like to be able to style my panes differently (specifically I'd like to set the flex-grow and shrink on each panel to different values).

As a general approach to fix this I was thinking of adding functionality to set each pane's classname. Currently when you set the className on the SplitPane it applies to each pane.

I have a fork and this is my current approach, looking for feedback:

  • Add a pane. class to each pane
  • Add a string[] property to Split pane called classNames (much like minSizes) and pass them to each pane.

What do you think?

Interesting. It would probably work! I haven't looked at the code for a bit but what if each pane just had a class name based on the index such as pane.1 and pane.2 etc. That way the same flexibility could be accomplished without an extra parameter.

Come to think of it this might be the case already...

Also sorry I hadn't responded in a while. I've been moving countries so it's been hectic.

@furgin were you able to accomplish what you needed? Did my comment help or did I misunderstand your issue?