cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

Sidebar should allow flexibility to compose items

Open landitus opened this issue 6 years ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe. Today's sidebar API is pretty rigid and doesn't allow any composability. I've had talks with designers and there's the need for flexibility for the Label. I think it's difficult to predict and encode these options in props. These are some rough examples of composability:

screen shot 2019-01-10 at 16 14 53

There's a caveat that our current labels/badges will need some shrinking to work. This is due to the Sidebar being too small. I believe we can update this down the line, and in the meantime allow teams to compose the sidebar better.

Describe the solution you'd like I believe we should allow passing the Label of the item as children. This would allow composing other components inside: another icon to the right, a tooltip, a label or a badge (or stuff we haven't come up yet).

Additional context This is similar to what Ant.design does: https://ant.design/components/menu/#components-menu-demo-inline

wdyt @siddharthkp @francocorreasosa ? Could this be part of the API refactor?

landitus avatar Jan 10 '19 19:01 landitus