hoist-react icon indicating copy to clipboard operation
hoist-react copied to clipboard

Support easier customization of `Panel` contents layout + padding

Open cnrudd opened this issue 4 years ago • 2 comments

I just had to help a client setup padding on panel element in a dialog.

The client's first choice of how to do it was: <Panel padding='10px' /> which didn't work because we are removing the padding prop. https://github.com/xh/hoist-react/blob/develop/desktop/cmp/panel/Panel.js#L76

Am wondering if after removing it from the out div, we could put it back on the xh-vframe that is in the content container.

That is most often where the user would have wanted the padding applied, and it avoids having to write css like:

.xh-panel .xh-vframe {
padding: 10px;
}

cnrudd avatar Jun 24 '20 15:06 cnrudd