0.3.20 • Published 3 years ago

@synerise/ds-folders v0.3.20

Weekly downloads
187
License
ISC
Repository
github
Last release
3 years ago

id: folders

title: Folders

Folders UI Component

Installation

npm i @synerise/ds-folders
or
yarn add @synerise/ds-folders

Usage

import Folders from '@synerise/ds-folders'

<Folders />

Demo

API

PropertyDescriptionTypeDefault
addButtonDisabledDefines if add button is disabledbooleanfalse
actionsDisplayThe way of displaying actions menuinline / dropdowninline
dataSourceArray of items which should be displayed as foldersFolderItem[][]
folderFilterFilter function which may be applied to the data source(item: FolderItem)=>boolean-
maxItemsVisibleThe maximum amount of items which will be visible on the initial rendernumber5
onAddCallback executed when new folder is added(added: FolderItem) => void-
onDeleteCallback executed when a folder is deleted(deleted: FolderItem, options: { mode: DeleteMode; destination?: FolderItem }) => void-
onEditCallback executed when a folder is edited(edited: FolderItem) => void-
onFavouriteCallback executed when a folder is added or removed from favourites(favourite: FolderItem) => void-
onSelectCallback executed when a folder is selected(selected: FolderItem) => void-
onSettingsCallback executed when user enters settings panel for a folder(selected: FolderItem) => void-
showHideStepNumber of items shown after clicking "show more" buttonnumber5
textsTranslation texts passed to the componentFolderTexts-

FolderItem

PropertyDescriptionTypeDefault
idUnique id of the folder itemstring-
nameName of the folderstring-
favouriteWhether item is added to favouritesbooleanfalse
canUpdateWhether item is editablebooleanfalse
canDeleteWhether item is removablebooleanfalse
canEnterSettingsWhether user can enter settings for the itembooleanfalse

FolderTexts

PropertyDescriptionTypeDefault
add"Add" textstring / React.ReactNode-
addItemLabelA label of the add formstring / React.ReactNode-
addToFavouriteA tooltip used for adding to the favouritesstring / React.ReactNode-
chooseDestinationFolderA message asking users where should removed folder's content go tostring / React.ReactNode-
delete"Delete" textstring / React.ReactNode-
deleteFolderLabelA label of the removal formstring / React.ReactNode-
deleteFolderConfirmationMessageA message asking users to confirm folder's removalstring / React.ReactNode-
deleteFolderDescriptionDescription of the removal formstring / React.ReactNode-
deleteFromFavouritesA tooltip used for removing from favouritesstring / React.ReactNode-
deleteAllContentA message displayed when user wants to delete all the content of the folderstring / React.ReactNode-
edit"Edit" text - displayed in actions menustring / React.ReactNode-
enterSettings"Settings" text - displayed in actions menustring / React.ReactNode-
folderNamePlaceholderPlaceholder of the input in the add folder formstring-
invalidNameErrorError displayed when user provides invalid folder namestring / React.ReactNode-
less"Less" text - displayed in the footerstring / React.ReactNode-
more"More" text - displayed in the footerstring / React.ReactNode-
moveToDefaultA message displayed when user wants to all the content of the folder to the default folderstring / React.ReactNode-
moveToOtherFolderA message displayed when user wants to all the content of the folder to the other folderstring / React.ReactNode-
showLessLabelAdditional label of the "show less" button in the footerstring / React.ReactNode-
showMoreLabelAdditional label of the "show more" button in the footerstring / React.ReactNode-
0.3.20

3 years ago

0.3.18

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.9

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.20

3 years ago

0.2.19

4 years ago

0.2.18

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.12

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.7

4 years ago

0.2.8

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago