Skip to content

Add support for React refs on Box #52

Open
@DannyDelott

Description

@DannyDelott

This is a great library, however it is missing a way to attach a ref to Box's underlying DOM node. This is useful for integrations with other third party libraries.

Specifically we want to be able to integrate with react-beautiful-dnd, which requires an exposed ref on the draggable items.

Would you be open to a PR that introduces an elementRef prop to the Box component?

Example usage:

render() {
  return (
    <Box elementRef={...}>
      {this.props.children}
    </Box>
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions