cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

List.Item cannot be wrapped without spreading props

Open dmiller9911 opened this issue 5 years ago • 0 comments

Describe the bug Currently, there is no way to wrap List.Item in another component without spreading props through due to List mapping over children and cloning the child and adding arrowIsVisible.

example:

const WrappedItem = () => <List.Item />

const list = (
  <List>
    <WrappedItem />
  </List>
)

Expected behavior The component can be wrapped and arrowIsVisible is available to List.Item. This can be acheived using React context instead of cloning children and adding props.

Additional context Add any other context about the problem here.

dmiller9911 avatar Nov 02 '19 16:11 dmiller9911