DigitalRiver / react-atlas

Composable React components with CSS Modules.
http://digitalriver.github.io/react-atlas/
MIT License
38 stars 25 forks source link

AccordionPanel: expanded prop only works with string value #898

Closed Darper closed 6 years ago

Darper commented 6 years ago

Even though the expanded prop in AccordionPanel is expecting a boolean, it only works if the value is set to a string of "true".

stuller commented 6 years ago

should it work with both?

Darper commented 6 years ago

It's coded to only work with booleans, but in reality it only works with strings. The intention was that boolean is required.

stuller commented 6 years ago

I think if we make it boolean, there will be errors when using regular divs, etc. for children. html only has string attributes. Do we want to restrict it to just AccordionPanel children? Either way, we should change the documentation for children prop, right now it says "Children should be either a string, an icon/glyphicon, or an image tag." which is misleading too.

Darper commented 6 years ago

Ah, sure. Then I suppose we should accept both.