I have a <List />
component where I want to add an initial padding-top
to the wrapper. Since all the elements are absolute
positioned I found this solution but I wonder if it's right or is there another solution less expensive:
const rowRenderer = ({ index, key, style, isScrolling }) => {
// ...
return (
<ul key={key}
style={{
...style,
top: style.top + 50,
}}>
{ items.map(itemRenderer) }
</ul>
)
}
The related part is the style
prop.