|
3 | 3 | "category": "lists",
|
4 | 4 | "description": "Drawer Component",
|
5 | 5 | "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 | + ], |
7 | 9 | "props": [
|
8 | 10 | {
|
9 | 11 | "name": "rightItems",
|
|
15 | 17 | "type": "ItemProps",
|
16 | 18 | "description": "The bottom layer's item to appear when opened from the left (a single item)"
|
17 | 19 | },
|
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 | + }, |
20 | 30 | {
|
21 | 31 | "name": "itemsTintColor",
|
22 | 32 | "type": "string",
|
23 | 33 | "description": "The color for the text and icon tint of the items",
|
24 | 34 | "default": "Colors.white"
|
25 | 35 | },
|
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 | + }, |
32 | 67 | {
|
33 | 68 | "name": "onWillFullSwipeLeft",
|
34 | 69 | "type": "() => void",
|
|
39 | 74 | "type": "() => {rowWidth, leftWidth, dragX, resetItemPosition}",
|
40 | 75 | "description": "Callback for left item toggle swipe"
|
41 | 76 | },
|
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 | + }, |
45 | 92 | {
|
46 | 93 | "name": "onWillFullSwipeRight",
|
47 | 94 | "type": "() => void",
|
48 | 95 | "description": "Callback for just before right item full swipe"
|
49 | 96 | },
|
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 | + }, |
54 | 117 | {
|
55 | 118 | "name": "customValue",
|
56 | 119 | "type": "any",
|
57 | 120 | "description": "Custom value of any type to pass on to the component and receive back in the action callbacks"
|
58 | 121 | },
|
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 | + } |
62 | 155 | }
|
0 commit comments