Skip to content

Commit ee4db5e

Browse files
infra: create api.json files for components missing documentation (#3627)
* infra: create api.json files for components missing documentation Co-Authored-By: [email protected] <[email protected]> * infra: remove TextFieldOld api.json as requested Co-Authored-By: [email protected] <[email protected]> * infra: remove Inputs api.json as requested Co-Authored-By: [email protected] <[email protected]> * infra: remove BaseInput api.json as requested Co-Authored-By: [email protected] <[email protected]> * infra: add api.json files for incubator components PanView and ExpandableOverlay Co-Authored-By: [email protected] <[email protected]> * infra: remove api.json for internal FadedScrollView component Co-Authored-By: [email protected] <[email protected]> * infra: remove api.json files for internal components Co-Authored-By: [email protected] <[email protected]> * infra: remove duplicate Picker api.json file Co-Authored-By: [email protected] <[email protected]> * infra: remove duplicate TabController api.json file Co-Authored-By: [email protected] <[email protected]> * infra: update category to 'incubator' for incubator components Co-Authored-By: [email protected] <[email protected]> * infra: restore ScrollBar API JSON file with fixed snippet Co-Authored-By: [email protected] <[email protected]> * infra: add API JSON files for SharedTransition subcomponents and update display names Co-Authored-By: [email protected] <[email protected]> * infra: update ScrollBar API JSON category and snippet Co-Authored-By: [email protected] <[email protected]> * infra: update ScrollBar API JSON snippet to use _.times function Co-Authored-By: [email protected] <[email protected]> * infra: update ScrollBar API JSON category to layouts Co-Authored-By: [email protected] <[email protected]> * infra: remove API JSON files for components that should not be exposed Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
1 parent 1ffc586 commit ee4db5e

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "KeyboardAwareScrollView",
3+
"category": "form",
4+
"description": "A wrapper component which handles the ScrollView insets properly when the keyboard is shown and hides the content, scrolling content above the keybaord.",
5+
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/KeyboardAwareScrollViewScreen.js",
6+
"props": [
7+
{
8+
"name": "getTextInputRefs",
9+
"type": "function",
10+
"description": "Function that returns an array of TextInput refs"
11+
},
12+
{
13+
"name": "onScroll",
14+
"type": "function",
15+
"description": "Callback for scroll events"
16+
},
17+
{
18+
"name": "startScrolledToBottom",
19+
"type": "boolean",
20+
"description": "Whether to start scrolled to bottom"
21+
},
22+
{
23+
"name": "scrollToBottomOnKBShow",
24+
"type": "boolean",
25+
"description": "Whether to scroll to bottom when keyboard shows"
26+
},
27+
{
28+
"name": "scrollToInputAdditionalOffset",
29+
"type": "number",
30+
"description": "Additional offset when scrolling to input"
31+
}
32+
],
33+
"snippet": [
34+
"<KeyboardAwareScrollView>",
35+
" <View>",
36+
" <TextField placeholder=\"Input with scrolling\" />",
37+
" </View>",
38+
"</KeyboardAwareScrollView>"
39+
]
40+
}

src/components/modal/modal.api.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "Modal",
3+
"category": "overlays",
4+
"description": "Component that present content on top of the invoking screen",
5+
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ModalScreen.tsx",
6+
"props": [
7+
{
8+
"name": "enableModalBlur",
9+
"type": "boolean",
10+
"description": "Blurs the modal background when transparent (iOS only)"
11+
},
12+
{
13+
"name": "blurView",
14+
"type": "JSX.Element",
15+
"description": "A custom view to use as a BlueView instead of the default one"
16+
},
17+
{
18+
"name": "onBackgroundPress",
19+
"type": "function",
20+
"description": "Allow dismissing a modal when clicking on its background"
21+
},
22+
{
23+
"name": "overlayBackgroundColor",
24+
"type": "string",
25+
"description": "The background color of the overlay"
26+
},
27+
{
28+
"name": "useGestureHandlerRootView",
29+
"type": "boolean",
30+
"description": "Should add a GestureHandlerRootView"
31+
},
32+
{
33+
"name": "useKeyboardAvoidingView",
34+
"type": "boolean",
35+
"description": "Should add a KeyboardAvoidingView (iOS only)"
36+
},
37+
{
38+
"name": "keyboardAvoidingViewProps",
39+
"type": "object",
40+
"description": "Send additional props to the KeyboardAvoidingView (iOS only)"
41+
}
42+
],
43+
"snippet": [
44+
"<Modal",
45+
" visible={visible}",
46+
" onBackgroundPress={() => setVisible(false)}",
47+
" overlayBackgroundColor=\"rgba(0, 0, 0, 0.7)\"",
48+
">",
49+
" <View>",
50+
" <Text>Modal Content</Text>",
51+
" </View>",
52+
"</Modal>"
53+
]
54+
}

0 commit comments

Comments
 (0)