Constructor
# new CenteredColumn(props) → {React.ReactElement}
Overview
A container that centers auto-sizing child. The outer wrapper element takes care of the width of a child. It takes all space given by a parent and centers the inner wrapper. The inner wrapper element takes care of the height of a child. It takes all width given by an outer wrapper.Usage
This component should have a single child - an AutoSizer from react-virtualized. In order to fully utilize this component's features, place it in an element that has 100% width and height.Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
Object | |||
children |
React.ReactNode | The content of the component. |
||
height |
number | string | The height of the InnerWrapper. Should be the same as the height of a child. |
||
maxWidth |
number | string |
<optional> |
100% | The max-width attribute of the OuterWrapper. |
minWidth |
number | string |
<optional> |
0% | The min-width attribute of the OuterWrapper. |
InnerWrapperProps |
Object |
<optional> |
Props applied to the InnerWrapper element. |
|
OuterWrapperProps |
Object |
<optional> |
Props applied to the OuterWrapper element. |
|
width |
number | string | The width of the OuterWrapper. Should be the same as the width of a child. |
React.ReactElement