mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-16 11:49:47 +08:00
39 lines
722 B
Markdown
39 lines
722 B
Markdown
import Compatibility from "../\_compatibility.mdx"
|
|
import Usage from "../\_usage.mdx"
|
|
|
|
# Container
|
|
|
|
:::caution
|
|
NativeWind's default breakpoints are not yet designed for native devices and still uses the web defaults.
|
|
:::
|
|
|
|
## Usage
|
|
|
|
<Usage />
|
|
|
|
## Example
|
|
|
|
```SnackPlayer name=Container
|
|
import { Text, View } from 'react-native';
|
|
import { styled } from 'nativewind';
|
|
|
|
const StyledView = styled(View)
|
|
const StyledText = styled(Text)
|
|
|
|
const App = () => {
|
|
return (
|
|
<StyledView className="container h-12 justify-center bg-slate-300 items-center">
|
|
<StyledText className="text-slate-800">Try resizing me! 🎉</StyledText>
|
|
</StyledView>
|
|
);
|
|
}
|
|
```
|
|
|
|
## Compatibility
|
|
|
|
<Compatibility
|
|
supported={[
|
|
"container",
|
|
]}
|
|
/>
|