-
-
Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathUsableArea.stories.tsx
More file actions
30 lines (25 loc) · 808 Bytes
/
UsableArea.stories.tsx
File metadata and controls
30 lines (25 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { StoryObj, Meta } from '@storybook/react-native';
import { View, StyleSheet, Text } from 'react-native';
function UsableAreaContent() {
return (
<View
style={{
...StyleSheet.absoluteFillObject,
borderWidth: 4,
borderColor: 'red',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Text>This box should reach all corners of the content area.</Text>
</View>
);
}
const meta = {
component: UsableAreaContent,
tags: ['safe-area', 'layout'],
} satisfies Meta<typeof UsableAreaContent>;
export default meta;
type UsableAreaStory = StoryObj<typeof meta>;
export const SafeArea: UsableAreaStory = { parameters: { noSafeArea: false } };
export const NoSafeArea: UsableAreaStory = { parameters: { noSafeArea: true } };