box-ui-elements
Version:
Box UI Elements
153 lines (79 loc) • 17.7 kB
text/mdx
import { Meta } from '@storybook/addon-docs/blocks';
import ContentExplorerStories from './ContentExplorer.stories';
<Meta of={ContentExplorerStories} />
[//]: # ()
[//]: # (### Demo ([Documentation](https://developer.box.com/docs/box-content-explorer)))
[//]: # (```jsx)
[//]: # (var ContentExplorer = require('./ContentExplorer').default;)
[//]: # ()
[//]: # (<IntlProvider locale="en">)
[//]: # ( <ContentExplorer)
[//]: # ( contentPreviewProps={{)
[//]: # ( contentSidebarProps: {)
[//]: # ( detailsSidebarProps: {)
[//]: # ( hasProperties: true,)
[//]: # ( hasNotices: true,)
[//]: # ( hasAccessStats: true,)
[//]: # ( hasClassification: true,)
[//]: # ( hasRetentionPolicy: true,)
[//]: # ( },)
[//]: # ( features: FEATURES,)
[//]: # ( hasActivityFeed: true,)
[//]: # ( hasMetadata: true,)
[//]: # ( hasSkills: true,)
[//]: # ( hasVersions: true,)
[//]: # ( },)
[//]: # ( }})
[//]: # ( features={FEATURES})
[//]: # ( rootFolderId={FOLDER_ID})
[//]: # ( token={TOKEN})
[//]: # ( />)
[//]: # (</IntlProvider>)
[//]: # (```)
[//]: # ()
[//]: # (### Screenshot)
[//]: # (<img src="https://user-images.githubusercontent.com/1075325/27887154-092a232a-6194-11e7-82f4-697331ac5cbe.png" width="600" alt="" />)
[//]: # (---)
[//]: # ()
[//]: # (### Props)
[//]: # (| Prop | Type | Default | Description |)
[//]: # (|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|)
[//]: # (| token* | string | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| autoFocus | boolean | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canCreateNewFolder | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canDelete | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canDownload | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canPreview | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canRename | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canSetShareAccess | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canShare | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| canUpload | boolean | `true` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| contentPreviewProps | Object | `{}` | Props to be forwarded to the `ContentPreview` UI Element. *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/preview/#Options).* |)
[//]: # (| contentUploaderProps | Object | `{}` | Props to be forwarded to the `ContentUploader` UI Element. *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/uploader/#Options).* |)
[//]: # (| currentFolderId | string | | The current folder shown for the content explorer. This should be a sub folder to the root folder. |)
[//]: # (| defaultView | string | `files` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| initialPage | number | 1 | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| initialPageSize | number | 50 | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| isTouch | boolean | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| language | string | `en-US` | *See the [Internationalization](/docs/elements-usage--docs#internationalization-i18n) section* |)
[//]: # (| logoUrl | string | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| messages | Map<string, string> | | *See the [Internationalization](/docs/elements-usage--docs#internationalization-i18n) section* |)
[//]: # (| onCreate | [Folder](https://developer.box.com/reference#folder-object)>) | | Callback function for when a folder is created. |)
[//]: # (| onDelete | function(Array<[File](https://developer.box.com/reference#file-object)>) | | Callback function for when item(s) are deleted. |)
[//]: # (| onDownload | function(Array<[File](https://developer.box.com/reference#file-object)>) | | Callback function for when item(s) are downloaded. |)
[//]: # (| onNavigate | function([File](https://developer.box.com/reference#file-object)) | | Callback function for when navigating into a folder. |)
[//]: # (| onPreview | function([File](https://developer.box.com/reference#file-object)) | | Callback function for when an item is previewed. |)
[//]: # (| onRename | function([File](https://developer.box.com/reference#file-object)) | | Callback function for when an item is renamed. |)
[//]: # (| 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. |)
[//]: # (| onUpload | function(Array<[File](https://developer.box.com/reference#file-object)>) | | Callback function for when item(s) are uploaded. |)
[//]: # (| requestInterceptor | function | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| responseInterceptor | function | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| rootFolderId | string | `0` | The root folder for the content explorer. |)
[//]: # (| sharedLink | string | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| sharedLinkPassword | string | | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| sortBy | string | `name` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # (| sortDirection | string | `asc` | *See the [developer docs](https://developer.box.com/guides/embed/ui-elements/explorer/#Options).* |)
[//]: # ()
[//]: # (### Keyboard Shortcuts)
[//]: # (*See the [developer docs](https://developer.box.com/docs/box-content-explorer#section-keyboard-shortcuts).*)
[//]: # ()