You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-24Lines changed: 25 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,23 +9,23 @@
9
9
The Box UI Elements are currently in beta and may contain bugs. Their interfaces may also update as needed. Please email [box-ui-kit-feedback@box.com](mailto:box-ui-kit-feedback@box.com) to report issues or provide feedback.
10
10
11
11
## Usage
12
-
If you are not building a React based app, please follow the [documentation link](https://developer.box.com/docs/box-ui-elements)to use the Box UI Elements as simple library includes. Continue reading below to import the components into your React based app.
12
+
If you are not building a [React](https://facebook.github.io/react) based app, please follow the [documentation on our developer docs](https://developer.box.com/docs/box-ui-elements), which shows how to use the Box UI Elements via script includes. Continue reading below to import the components into your React based app.
13
13
14
14
## Installation
15
15
`yarn add box-ui-elements`
16
16
17
17
## Authentication
18
-
We have designed the Box UI Elements in an authentication-type agnostic way so whether you are using them for users who have Box accounts (Managed Users) or non-Box accounts (App Users), they should just work out of the box. They only expect a**token** to be passed in for authentication. Please refer to the documentation links to learn more about authentication and generating access tokens.
18
+
We have designed the Box UI Elements in an authentication-type agnostic way. Whether you are using them for users who have Box accounts (Managed Users) or non-Box accounts (App Users), they should just work out of the box. They only expect an**access token** to be passed in for authentication. Please refer to the documentation links to learn more about authentication and generating access tokens.
19
19
20
20
## CSS
21
-
The Box UI Elements require their corresponding CSS stylesheet to render properly. If you import the CSS as shown in the examples below, you will require setting up webpack's style-loader / css-loader plugins to properly process the CSS. Alternatively, you can just include the CSS file in your apps's HTML without importing it into javascript.
21
+
The Box UI Elements require their corresponding CSS stylesheet to render properly. If you import the CSS as shown in the examples below, you will require setting up webpack's style-loader / css-loader plugins to properly process the CSS. Alternatively, you can just include the CSS file (hosted versions can be found in the documentation links) in your apps's HTML without importing it into javascript.
22
22
23
23
## Components
24
-
You can import the `ContentExplorer`, `ContentPicker`, `ContentUploader`, `ContentPreview` or `ContentTree`. Likewise, you can also import the `ContentPickerPopup`, `ContentUploaderPopup` or `ContentTreePopup` which are popup versions for the picker, uploader and content tree respectively.
24
+
You can import the `ContentExplorer`, `ContentPicker`, `ContentUploader`, `ContentPreview` or `ContentTree`. Likewise, you can also import the `ContentPickerPopup`, `ContentUploaderPopup` or `ContentTreePopup` which are popup versions for the content picker, content uploader and content tree respectively.
25
25
26
26
## Content Explorer ([Documentation](https://developer.box.com/docs/box-content-explorer))
| token*| string ||*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
54
-
| getLocalizedMessage*| function || Function to get localized strings. |
54
+
| getLocalizedMessage*| function(string, { [string]: string })|| Function to get localized strings. |
55
55
| rootFolderId | string |`0`| The root folder for the content explorer. |
56
56
| currentFolderId | string || The current folder shown for the content explorer. This should be a sub folder to the root folder. |
57
57
| sortBy | string |`name`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
58
-
| sortDirection |SortDirection|`asc`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
58
+
| sortDirection |string|`asc`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
59
59
| canPreview | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
60
60
| canDownload | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
61
61
| canDelete | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
62
62
| canUpload | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
63
63
| canRename | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
64
64
| canShare | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
65
65
| canSetShareAccess | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
66
-
| onDelete | function || Callback function for when item(s) are deleted. |
67
-
| onDownload | function || Callback function for when item(s) are downloaded. |
68
-
| onPreview | function || Callback function for when an item is previewed. |
69
-
| onRename | function || Callback function for when an item is renamed. |
70
-
| onSelect | function || Callback function for when item(s) are selected. |
71
-
| onUpload | function || Callback function for when item(s) are uploaded. |
66
+
| onDelete | function(Array<[File](https://developer.box.com/reference#file-object)>) || Callback function for when item(s) are deleted. |
67
+
| onDownload | function(Array<[File](https://developer.box.com/reference#file-object)>) || Callback function for when item(s) are downloaded. |
68
+
| onPreview | function([File](https://developer.box.com/reference#file-object)) || Callback function for when an item is previewed. |
69
+
| onRename | function([File](https://developer.box.com/reference#file-object)) || Callback function for when an item is renamed. |
70
+
| onSelect | function(Array<[Folder](https://developer.box.com/reference#folder-object)|[File](https://developer.box.com/reference#file-object)|[Web Link](https://developer.box.com/reference#web-link-object)>) || Callback function for when item(s) are selected. |
71
+
| onUpload | function(Array<[File](https://developer.box.com/reference#file-object)>) || Callback function for when item(s) are uploaded. |
72
+
| onNavigate | function([File](https://developer.box.com/reference#file-object)) || Callback function for when navigating into a folder. |
72
73
| isTouch | boolean ||*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
73
74
| logoUrl | string ||*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
74
75
| sharedLink | string ||*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-options).*|
| token*| string ||*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
106
-
| getLocalizedMessage*| function || Function to get localized strings. |
107
+
| getLocalizedMessage*| function(string, { [string]: string })|| Function to get localized strings. |
107
108
| rootFolderId | string |`0`| The root folder for the content picker. |
108
109
| type | string |`file, web_link`| Indicates which type of items can be picked. Should be a comma seperated combination of `file`, `folder` or `web_link`. |
109
110
| sortBy | string |`name`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
110
-
| sortDirection |SortDirection|`asc`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
111
-
| extensions | string[]|`[]`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
111
+
| sortDirection |string|`asc`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
112
+
| extensions |Array<string>|`[]`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
112
113
| maxSelectable | number |`Infinity`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
113
114
| canUpload | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
114
115
| canSetShareAccess | boolean |`true`|*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
@@ -120,7 +121,7 @@ render(
120
121
| sharedLinkPassword | string ||*See the [developer docs](https://developer.box.com/docs/box-content-picker#section-options).*|
| token*| string ||*See the [developer docs](https://developer.box.com/docs/box-content-tree#section-options).*|
187
-
| getLocalizedMessage*| function || Function to get localized strings. |
188
+
| getLocalizedMessage*| function(string, { [string]: string })|| Function to get localized strings. |
188
189
| rootFolderId | string |`0`| The root folder for the content tree. |
189
190
| type | string |`file, web_link, folder`| Indicates which type of items show up in the tree. Should be a comma seperated combination of `file`, `folder` or `web_link`. |
190
-
| onClick | function || Callback function for when an item is clicked. |
191
+
| onClick | function([Folder](https://developer.box.com/reference#folder-object)|[File](https://developer.box.com/reference#file-object)|[Web Link](https://developer.box.com/reference#web-link-object))|| Callback function for when an item is clicked. |
191
192
| isTouch | boolean ||*See the [developer docs](https://developer.box.com/docs/box-content-tree#section-options).*|
192
193
| logoUrl | string ||*See the [developer docs](https://developer.box.com/docs/box-content-tree#section-options).*|
193
194
| sharedLink | string ||*See the [developer docs](https://developer.box.com/docs/box-content-tree#section-options).*|
@@ -224,7 +225,7 @@ render(
224
225
| fileId*| string || The id of the file to preview. |
225
226
| locale | string |`en-US`| Locale for this component. |
226
227
| onLoad | function || Callback function for when a file preview loads. |
227
-
| collection | string[]|`[]`|*See the [developer docs](https://developer.box.com/docs/box-content-preview#section-initialization-and-options).*|
228
+
| collection |Array<string>|`[]`|*See the [developer docs](https://developer.box.com/docs/box-content-preview#section-initialization-and-options).*|
228
229
| header | string |`light`|*See the [developer docs](https://developer.box.com/docs/box-content-preview#section-initialization-and-options).*|
229
230
| logoUrl | string ||*See the [developer docs](https://developer.box.com/docs/box-content-preview#section-initialization-and-options).*|
230
231
| sharedLink | string ||*See the [developer docs](https://developer.box.com/docs/box-content-preview#section-initialization-and-options).*|
0 commit comments