Skip to content

Commit 8d88b48

Browse files
committed
docs: refactor imports and simplify SafeView component structure
1 parent f0fd6d7 commit 8d88b48

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/src/content/docs/guides/basic-usage.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ export function MyComponent() {
2222
Here's a more complete example showing a card component with interactive elements:
2323

2424
```tsx
25-
import { View, Text } from "react-native";
26-
import { Pressable } from "@mgcrea/react-native-tailwind";
25+
import { View, Text, Pressable } from "react-native";
2726

2827
export function Card({ title, description, onPress }) {
2928
return (
@@ -53,10 +52,7 @@ export function SafeView({ children }) {
5352
const insets = useSafeAreaInsets();
5453

5554
return (
56-
<View
57-
className="flex-1 p-4 bg-blue-500"
58-
style={{ paddingTop: insets.top }}
59-
>
55+
<View className="flex-1 p-4 bg-blue-500" style={{ paddingTop: insets.top }}>
6056
<Text>Content with safe area</Text>
6157
</View>
6258
);

0 commit comments

Comments
 (0)