Container
The Container component is the root wrapper for your screens. It handles safe areas, provides consistent padding, and manages status bar configuration.
Featuresβ
- π± Automatic safe area handling
- π¨ Customizable backgrounds
- π Optional padding control
- π Modal screen support
- π Backdrop press handling
Basic Usageβ
import { Container } from '@tansuk/rott-ui';
<Container>
{/* Your screen content */}
</Container>
Without Paddingβ
<Container noPadding>
{/* Full-width content */}
</Container>
Centered Contentβ
<Container center>
<Label text="Centered Content" />
</Container>
Modal Screenβ
<Container isModalScreen>
{/* Modal content */}
</Container>
Propsβ
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Screen content |
noPadding | boolean | false | Remove padding |
center | boolean | false | Center content |
isModalScreen | boolean | false | Modal configuration |
fullScreen | boolean | false | Disable safe areas |
closeOnClick | boolean | false | Backdrop press enabled |
showStatusBar | boolean | true | Show status bar |
Exampleβ
<Container noPadding>
<Header title="My Screen" />
<Content flex={1}>
{/* Content */}
</Content>
</Container>