Skip to content

add a prop for setting the style property. #6

@alexklibisz

Description

@alexklibisz

From what I was able to tell, you can set a definite height, but only via the className property.

I have a scenario where the container that the chat box lives will change size dynamically (due to input area growing/shrinking below it and search area shrinking/growing above it). I am detecting the container size changes using the detect-element-resize library (https://github.com/sdecima/javascript-detect-element-resize), so it would be simplest to have a style prop that can be passed separate from the classname prop.

for example:

<ChatView style={{height: this.state.containerHeight}} ....> {items} </ChatView>

Or is there maybe already a way to do this without making any changes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions