Skip to content

Commit 27e1cfa

Browse files
authored
Docs - Added figma embed links for missing pages (#3698)
* Added figma embed to some missing pages * removed switch change * Removed description * Added description from api json description
1 parent 495ed81 commit 27e1cfa

File tree

8 files changed

+487
-70
lines changed

8 files changed

+487
-70
lines changed

src/components/WheelPicker/wheelPicker.api.json

Lines changed: 85 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,58 @@
66
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/WheelPickerScreen.tsx",
77
"images": [],
88
"props": [
9-
{"name": "initialValue", "type": "number | string", "description": "Initial value (uncontrolled)"},
10-
{"name": "items", "type": "WheelPickerItemProps[]", "description": "Data source for WheelPicker"},
11-
{"name": "itemHeight", "type": "number", "description": "Height of each item in the WheelPicker", "default": "44"},
12-
{"name": "numberOfVisibleRows", "type": "number", "description": "Number of rows visible", "default": "5"},
13-
{"name": "activeTextColor", "type": "string", "description": "Text color for the focused row"},
14-
{"name": "inactiveTextColor", "type": "string", "description": "Text color for other, non-focused rows"},
15-
{"name": "textStyle", "type": "TextStyle", "description": "Row text custom style"},
16-
{"name": "label", "type": "string", "description": "Additional label to render next to the items text"},
17-
{"name": "labelStyle", "type": "TextStyle", "description": "Additional label's style"},
18-
{"name": "labelProps", "type": "TextProps", "description": "Additional label's props"},
9+
{
10+
"name": "initialValue",
11+
"type": "number | string",
12+
"description": "Initial value (uncontrolled)"
13+
},
14+
{
15+
"name": "items",
16+
"type": "WheelPickerItemProps[]",
17+
"description": "Data source for WheelPicker"
18+
},
19+
{
20+
"name": "itemHeight",
21+
"type": "number",
22+
"description": "Height of each item in the WheelPicker",
23+
"default": "44"
24+
},
25+
{
26+
"name": "numberOfVisibleRows",
27+
"type": "number",
28+
"description": "Number of rows visible",
29+
"default": "5"
30+
},
31+
{
32+
"name": "activeTextColor",
33+
"type": "string",
34+
"description": "Text color for the focused row"
35+
},
36+
{
37+
"name": "inactiveTextColor",
38+
"type": "string",
39+
"description": "Text color for other, non-focused rows"
40+
},
41+
{
42+
"name": "textStyle",
43+
"type": "TextStyle",
44+
"description": "Row text custom style"
45+
},
46+
{
47+
"name": "label",
48+
"type": "string",
49+
"description": "Additional label to render next to the items text"
50+
},
51+
{
52+
"name": "labelStyle",
53+
"type": "TextStyle",
54+
"description": "Additional label's style"
55+
},
56+
{
57+
"name": "labelProps",
58+
"type": "TextProps",
59+
"description": "Additional label's props"
60+
},
1961
{
2062
"name": "onChange",
2163
"type": "(item: string | number, index: number) => void",
@@ -33,8 +75,16 @@
3375
"description": "Align the content to center, right ot left",
3476
"default": "center"
3577
},
36-
{"name": "separatorsStyle", "type": "ViewStyle", "description": "Extra style for the separators"},
37-
{"name": "testID", "type": "string", "description": "test identifier"},
78+
{
79+
"name": "separatorsStyle",
80+
"type": "ViewStyle",
81+
"description": "Extra style for the separators"
82+
},
83+
{
84+
"name": "testID",
85+
"type": "string",
86+
"description": "test identifier"
87+
},
3888
{
3989
"name": "flatListProps",
4090
"type": "FlatListProps",
@@ -47,5 +97,27 @@
4797
" initialValue={'yes'$2}",
4898
" onChange={() => console.log('changed')$3}",
4999
"/>"
50-
]
100+
],
101+
"docs": {
102+
"hero": {
103+
"title": "WheelPicker",
104+
"description": "A customizable WheelPicker component"
105+
},
106+
"tabs": [
107+
{
108+
"title": "UX Guidelines",
109+
"sections": [
110+
{
111+
"type": "section",
112+
"content": [
113+
{
114+
"value": "https://embed.figma.com/design/Krv1pLl7kq2L52vMRwd498/MADS-Guidelines?node-id=13-134250&embed-host=share",
115+
"height": 1600
116+
}
117+
]
118+
}
119+
]
120+
}
121+
]
122+
}
51123
}

src/components/chipsInput/chipsInput.api.json

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@
22
"name": "ChipsInput",
33
"category": "form",
44
"description": "A chips input",
5-
"extends": ["form/TextField"],
6-
"modifiers": ["margin", "color", "typography"],
5+
"extends": [
6+
"form/TextField"
7+
],
8+
"modifiers": [
9+
"margin",
10+
"color",
11+
"typography"
12+
],
713
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ChipsInputScreen.tsx",
814
"images": [],
915
"props": [
10-
{"name": "chips", "type": "ChipProps[]", "description": "List of chips to render"},
16+
{
17+
"name": "chips",
18+
"type": "ChipProps[]",
19+
"description": "List of chips to render"
20+
},
1121
{
1222
"name": "defaultChipProps",
1323
"type": "ChipProps",
@@ -18,12 +28,38 @@
1828
"type": "(newChips, changeReason, updatedChip) => void",
1929
"description": "Callback for chips change (adding or removing chip)"
2030
},
21-
{"name": "maxChips", "type": "number", "description": "The maximum chips to allow adding"}
31+
{
32+
"name": "maxChips",
33+
"type": "number",
34+
"description": "The maximum chips to allow adding"
35+
}
2236
],
2337
"snippet": [
2438
"<ChipsInput",
2539
" placeholder={'Placeholder'$1}",
2640
" chips={[{label: 'Falcon 9'}, {label: 'Enterprise'}, {label: 'Challenger', borderRadius: 0}]$2}",
2741
"/>"
28-
]
42+
],
43+
"docs": {
44+
"hero": {
45+
"title": "ChipsInput",
46+
"description": "A chips input"
47+
},
48+
"tabs": [
49+
{
50+
"title": "UX Guidelines",
51+
"sections": [
52+
{
53+
"type": "section",
54+
"content": [
55+
{
56+
"value": "https://embed.figma.com/design/Krv1pLl7kq2L52vMRwd498/MADS-Guidelines?node-id=13-114418&embed-host=share",
57+
"height": 1600
58+
}
59+
]
60+
}
61+
]
62+
}
63+
]
64+
}
2965
}

src/components/drawer/drawer.api.json

Lines changed: 112 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"category": "lists",
44
"description": "Drawer Component",
55
"example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/DrawerScreen.tsx",
6-
"images": ["https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Drawer/Drawer.gif?raw=true"],
6+
"images": [
7+
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Drawer/Drawer.gif?raw=true"
8+
],
79
"props": [
810
{
911
"name": "rightItems",
@@ -15,20 +17,53 @@
1517
"type": "ItemProps",
1618
"description": "The bottom layer's item to appear when opened from the left (a single item)"
1719
},
18-
{"name": "bounciness", "type": "number", "description": "The drawer animation bounciness"},
19-
{"name": "itemsMinWidth", "type": "number", "description": "Set a different minimum width"},
20+
{
21+
"name": "bounciness",
22+
"type": "number",
23+
"description": "The drawer animation bounciness"
24+
},
25+
{
26+
"name": "itemsMinWidth",
27+
"type": "number",
28+
"description": "Set a different minimum width"
29+
},
2030
{
2131
"name": "itemsTintColor",
2232
"type": "string",
2333
"description": "The color for the text and icon tint of the items",
2434
"default": "Colors.white"
2535
},
26-
{"name": "itemsIconSize", "type": "number", "description": "The items' icon size", "default": "24"},
27-
{"name": "itemsTextStyle", "type": "TextStyle", "description": "The items' text style"},
28-
{"name": "useNativeAnimations", "type": "boolean", "description": "Perform the animation in natively"},
29-
{"name": "fullSwipeLeft", "type": "boolean", "description": "Whether to allow a full left swipe"},
30-
{"name": "fullLeftThreshold", "type": "number", "description": "Threshold for a left full swipe (0-1)"},
31-
{"name": "onFullSwipeLeft", "type": "() => void", "description": "Callback for left item full swipe"},
36+
{
37+
"name": "itemsIconSize",
38+
"type": "number",
39+
"description": "The items' icon size",
40+
"default": "24"
41+
},
42+
{
43+
"name": "itemsTextStyle",
44+
"type": "TextStyle",
45+
"description": "The items' text style"
46+
},
47+
{
48+
"name": "useNativeAnimations",
49+
"type": "boolean",
50+
"description": "Perform the animation in natively"
51+
},
52+
{
53+
"name": "fullSwipeLeft",
54+
"type": "boolean",
55+
"description": "Whether to allow a full left swipe"
56+
},
57+
{
58+
"name": "fullLeftThreshold",
59+
"type": "number",
60+
"description": "Threshold for a left full swipe (0-1)"
61+
},
62+
{
63+
"name": "onFullSwipeLeft",
64+
"type": "() => void",
65+
"description": "Callback for left item full swipe"
66+
},
3267
{
3368
"name": "onWillFullSwipeLeft",
3469
"type": "() => void",
@@ -39,24 +74,82 @@
3974
"type": "() => {rowWidth, leftWidth, dragX, resetItemPosition}",
4075
"description": "Callback for left item toggle swipe"
4176
},
42-
{"name": "fullSwipeRight", "type": "boolean", "description": "Whether to allow a full right swipe"},
43-
{"name": "fullRightThreshold", "type": "number", "description": "Threshold for a right full swipe (0-1)"},
44-
{"name": "onFullSwipeRight", "type": "() => void", "description": "Callback for right item full swipe"},
77+
{
78+
"name": "fullSwipeRight",
79+
"type": "boolean",
80+
"description": "Whether to allow a full right swipe"
81+
},
82+
{
83+
"name": "fullRightThreshold",
84+
"type": "number",
85+
"description": "Threshold for a right full swipe (0-1)"
86+
},
87+
{
88+
"name": "onFullSwipeRight",
89+
"type": "() => void",
90+
"description": "Callback for right item full swipe"
91+
},
4592
{
4693
"name": "onWillFullSwipeRight",
4794
"type": "() => void",
4895
"description": "Callback for just before right item full swipe"
4996
},
50-
{"name": "disableHaptic", "type": "boolean", "description": "Whether to disable the haptic"},
51-
{"name": "onDragStart", "type": "() => any", "description": "Called when drag gesture starts"},
52-
{"name": "onSwipeableWillOpen", "type": "() => void", "description": "Callback for open action"},
53-
{"name": "onSwipeableWillClose", "type": "() => void", "description": "Callback for close action"},
97+
{
98+
"name": "disableHaptic",
99+
"type": "boolean",
100+
"description": "Whether to disable the haptic"
101+
},
102+
{
103+
"name": "onDragStart",
104+
"type": "() => any",
105+
"description": "Called when drag gesture starts"
106+
},
107+
{
108+
"name": "onSwipeableWillOpen",
109+
"type": "() => void",
110+
"description": "Callback for open action"
111+
},
112+
{
113+
"name": "onSwipeableWillClose",
114+
"type": "() => void",
115+
"description": "Callback for close action"
116+
},
54117
{
55118
"name": "customValue",
56119
"type": "any",
57120
"description": "Custom value of any type to pass on to the component and receive back in the action callbacks"
58121
},
59-
{"name": "style", "type": "ViewStyle", "description": "Component's style"},
60-
{"name": "testID", "type": "string", "description": "The test id for e2e tests"}
61-
]
122+
{
123+
"name": "style",
124+
"type": "ViewStyle",
125+
"description": "Component's style"
126+
},
127+
{
128+
"name": "testID",
129+
"type": "string",
130+
"description": "The test id for e2e tests"
131+
}
132+
],
133+
"docs": {
134+
"hero": {
135+
"title": "Drawer",
136+
"description": "Drawer Component"
137+
},
138+
"tabs": [
139+
{
140+
"title": "UX Guidelines",
141+
"sections": [
142+
{
143+
"type": "section",
144+
"content": [
145+
{
146+
"value": "https://embed.figma.com/design/Krv1pLl7kq2L52vMRwd498/MADS-Guidelines?node-id=5958-379805&embed-host=share",
147+
"height": 1600
148+
}
149+
]
150+
}
151+
]
152+
}
153+
]
154+
}
62155
}

0 commit comments

Comments
 (0)