@mohamed-karawia/library 0.1.5 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stories/Reusable Components/fakeData.js +24 -4
- package/dist/stories/helpers/util.js +16 -14
- package/package.json +1 -1
- package/src/stories/Reusable Components/fakeData.js +5 -0
- package/src/stories/helpers/util.js +1 -0
- package/.github/workflows/chromatic.yml +0 -26
- package/.storybook/main.js +0 -21
- package/.storybook/middleware.js +0 -28
- package/.storybook/preview.js +0 -9
- package/build-storybook.log +0 -2704
- package/dist/stories/API/API.stories.js +0 -24
- package/dist/stories/Agora/Chat/Chat.stories.js +0 -24
- package/dist/stories/Agora/Room/Room.stories.js +0 -24
- package/dist/stories/Buttons/Buttons/Buttons.stories.js +0 -39
- package/dist/stories/Buttons/ReactModal/ReactModal.stories.js +0 -30
- package/dist/stories/Chat/Chat.stories.js +0 -76
- package/dist/stories/Common Inputs/CheckboxGroup/CheckboxGroup.stories.js +0 -58
- package/dist/stories/Common Inputs/CustomAutoComplete/CustomAutoComplete.stories.js +0 -56
- package/dist/stories/Common Inputs/CustomDropzone/CustomDropzone.stories.js +0 -47
- package/dist/stories/Common Inputs/CustomSelect/CustomSelect.stories.js +0 -61
- package/dist/stories/Common Inputs/CustomTextarea/CustomTextarea.stories.js +0 -48
- package/dist/stories/Common Inputs/DatePicker/DatePicker.stories.js +0 -60
- package/dist/stories/Common Inputs/EditorComponent/EditorComponent.stories.js +0 -62
- package/dist/stories/Common Inputs/Formik/InputField/InputField.stories.js +0 -43
- package/dist/stories/Common Inputs/Formik/RadioField/RadioField.stories.js +0 -60
- package/dist/stories/Common Inputs/RadioInput/RadioInput.stories.js +0 -50
- package/dist/stories/Common Inputs/RichTextInput/RichTextInput.stories.js +0 -51
- package/dist/stories/Common Inputs/TextField/TextField.stories.js +0 -48
- package/dist/stories/Containers/BaseMaterial.stories.js +0 -24
- package/dist/stories/Containers/WidgetExample/WidgetBody.stories.js +0 -24
- package/dist/stories/Containers/WidgetExample/WidgetExample.stories.js +0 -24
- package/dist/stories/Containers/WidgetExample/WidgetHead.stories.js +0 -24
- package/dist/stories/Enrollment/Admin/CreateForm/CreateForm.stories.js +0 -22
- package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.stories.js +0 -42
- package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.stories.js +0 -65
- package/dist/stories/Enrollment/Guest/FillForm/FillForm.stories.js +0 -48
- package/dist/stories/Events/CreateEvent/CreateEvent.stories.js +0 -30
- package/dist/stories/Events/Event/Event.stories.js +0 -33
- package/dist/stories/Events/EventsList/EventsList.stories.js +0 -44
- package/dist/stories/Forms/AddPhoto/AddPhoto.stories.js +0 -47
- package/dist/stories/Forms/AddSong/AddSong.stories.js +0 -37
- package/dist/stories/Forms/AddVideo/AddVideo.stories.js +0 -33
- package/dist/stories/Forms/Create-Profile/CreateProfile.stories.js +0 -49
- package/dist/stories/Forms/Create-Profile/subcomponents/LogoUploader.stories.js +0 -42
- package/dist/stories/Forms/Create-Profile/subcomponents/ProfilePhoto.stories.js +0 -41
- package/dist/stories/Forms/Create-Profile/subcomponents/ResetBtn.stories.js +0 -32
- package/dist/stories/Forms/CreateAlbum/CreateAlbum.stories.js +0 -47
- package/dist/stories/Forms/CreateAnnouncementForm/CreateAnnouncementForm.stories.js +0 -58
- package/dist/stories/Forms/CreateMusicAlbum/CreateMusicAlbum.stories.js +0 -47
- package/dist/stories/Forms/CreateProfile/CreateProfile.stories.js +0 -24
- package/dist/stories/Forms/CreateProfile-3/CreateProfile.stories.js +0 -24
- package/dist/stories/Forms/CreateUser/CreateUser.stories.js +0 -26
- package/dist/stories/Forms/CreateVideoAlbum/CreateVideoAlbum.stories.js +0 -37
- package/dist/stories/Forms/Form/Form.stories.js +0 -24
- package/dist/stories/Forms/NewProfile/NewProfile.stories.js +0 -24
- package/dist/stories/Layout/Body/Body.stories.js +0 -30
- package/dist/stories/Layout/Center/Center.stories.js +0 -24
- package/dist/stories/Layout/Head/Head.stories.js +0 -24
- package/dist/stories/Layout/Left/Left.stories.js +0 -24
- package/dist/stories/Layout/Right/Right.stories.js +0 -24
- package/dist/stories/Library/CreateFolder/CreateFolder.stories.js +0 -45
- package/dist/stories/Library/Folders/Folders.stories.js +0 -55
- package/dist/stories/Library/Notes/Notes.stories.js +0 -42
- package/dist/stories/Library/ViewNote/ViewNote.stories.js +0 -24
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.stories.js +0 -115
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.stories.js +0 -107
- package/dist/stories/Navbar/Navbar.stories.js +0 -41
- package/dist/stories/Pages/Blank/Blank.stories.js +0 -24
- package/dist/stories/Pages/Centered/Centered.stories.js +0 -24
- package/dist/stories/Pages/Chat/Chat.stories.js +0 -74
- package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.stories.js +0 -22
- package/dist/stories/Pages/Enrollment/FillForm/FillForm.stories.js +0 -22
- package/dist/stories/Pages/Enrollment/Forms/Forms.stories.js +0 -22
- package/dist/stories/Pages/Events/Event/Event.stories.js +0 -22
- package/dist/stories/Pages/Events/Events/Events.stories.js +0 -22
- package/dist/stories/Pages/Library/Folders/Library.stories.js +0 -22
- package/dist/stories/Pages/Library/Notes/Notes.stories.js +0 -22
- package/dist/stories/Pages/Music/MusicAlbum/Music.stories.js +0 -22
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.stories.js +0 -22
- package/dist/stories/Pages/Photos/Album/Album.stories.js +0 -22
- package/dist/stories/Pages/Photos/Albums/Albums.stories.js +0 -22
- package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.stories.js +0 -22
- package/dist/stories/Pages/Video/VideoAlbum/Video.stories.js +0 -22
- package/dist/stories/Pages/ViewWorld/ViewWorld.stories.js +0 -264
- package/dist/stories/Photo Album/DetailedPhoto/DetailedPhoto.stories.js +0 -32
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.stories.js +0 -115
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.stories.js +0 -102
- package/dist/stories/Reusable Components/Cards/Card-style-1/CardStyle1.stories.js +0 -35
- package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.stories.js +0 -37
- package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.stories.js +0 -40
- package/dist/stories/Reusable Components/Cards/Card-style-2/CardStyle2.stories.js +0 -37
- package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.stories.js +0 -34
- package/dist/stories/Reusable Components/Cards/Card-style-4/CardStyle4.stories.js +0 -39
- package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.stories.js +0 -27
- package/dist/stories/Reusable Components/Cards/Card-style-7/CardStyle7.stories.js +0 -37
- package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.stories.js +0 -44
- package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.stories.js +0 -27
- package/dist/stories/Reusable Components/Cards/Card.stories.js +0 -132
- package/dist/stories/Reusable Components/Controls/Controls.stories.js +0 -49
- package/dist/stories/Reusable Components/Gallery/Gallery.stories.js +0 -56
- package/dist/stories/Reusable Components/Lists/Cards/ListCard-1.stories.js +0 -1
- package/dist/stories/Reusable Components/Lists/List.stories.js +0 -1
- package/dist/stories/Reusable Components/Mention/Mention.stories.js +0 -66
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.stories.js +0 -207
- package/dist/stories/Reusable Components/ReusableHeader/ReusableHeader.stories.js +0 -35
- package/dist/stories/Reusable Components/ReusableList/ReusableList.stories.js +0 -84
- package/dist/stories/Reusable Components/SearchCard/SearchCard.stories.js +0 -24
- package/dist/stories/Reusable Components/SpaceContainer/SpaceContainer.stories.js +0 -80
- package/dist/stories/Reusable Components/Spinner/Spinner.stories.js +0 -22
- package/dist/stories/Reusable Components/WidgetContainer/WidgetContainer.stories.js +0 -80
- package/dist/stories/Spaces/WelcomeSpace/WelcomeSpace.stories.js +0 -24
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.stories.js +0 -101
- package/dist/stories/VideoAlbum/Comments/Comments.stories.js +0 -45
- package/dist/stories/VideoAlbum/VideoPlayer/VideoPlayer.stories.js +0 -149
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.stories.js +0 -49
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.stories.js +0 -113
- package/dist/stories/Widgets/LogoWidget/LogoWidget.stories.js +0 -26
- package/dist/stories/Widgets/MusicPlayer/MusicPlayer.stories.js +0 -44
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.stories.js +0 -52
- package/dist/stories/Widgets/SpacesList/SpacesList.stories.js +0 -52
- package/dist/stories/Widgets/SpacesList/SpacesListItem.stories.js +0 -24
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/src/stories/API/API.stories.js +0 -10
- package/src/stories/Agora/Chat/Chat.stories.jsx +0 -10
- package/src/stories/Agora/Room/Room.stories.jsx +0 -10
- package/src/stories/Buttons/Buttons/Buttons.stories.jsx +0 -24
- package/src/stories/Buttons/ReactModal/ReactModal.stories.jsx +0 -18
- package/src/stories/Chat/Chat.stories.jsx +0 -59
- package/src/stories/Common Inputs/CheckboxGroup/CheckboxGroup.stories.jsx +0 -32
- package/src/stories/Common Inputs/CustomAutoComplete/CustomAutoComplete.stories.jsx +0 -35
- package/src/stories/Common Inputs/CustomDropzone/CustomDropzone.stories.jsx +0 -26
- package/src/stories/Common Inputs/CustomSelect/CustomSelect.stories.jsx +0 -36
- package/src/stories/Common Inputs/CustomTextarea/CustomTextarea.stories.jsx +0 -31
- package/src/stories/Common Inputs/DatePicker/DatePicker.stories.jsx +0 -47
- package/src/stories/Common Inputs/EditorComponent/EditorComponent.stories.jsx +0 -60
- package/src/stories/Common Inputs/Formik/InputField/InputField.stories.jsx +0 -27
- package/src/stories/Common Inputs/Formik/RadioField/RadioField.stories.jsx +0 -41
- package/src/stories/Common Inputs/RadioInput/RadioInput.stories.js +0 -30
- package/src/stories/Common Inputs/RichTextInput/RichTextInput.stories.js +0 -45
- package/src/stories/Common Inputs/TextField/TextField.stories.jsx +0 -31
- package/src/stories/Containers/BaseMaterial.stories.js +0 -10
- package/src/stories/Containers/WidgetExample/WidgetBody.stories.js +0 -10
- package/src/stories/Containers/WidgetExample/WidgetExample.stories.js +0 -10
- package/src/stories/Containers/WidgetExample/WidgetHead.stories.js +0 -10
- package/src/stories/Enrollment/Admin/CreateForm/CreateForm.stories.jsx +0 -8
- package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.stories.jsx +0 -36
- package/src/stories/Enrollment/Admin/ViewForms/ViewForms.stories.jsx +0 -66
- package/src/stories/Enrollment/Guest/FillForm/FillForm.stories.jsx +0 -27
- package/src/stories/Events/CreateEvent/CreateEvent.stories.jsx +0 -19
- package/src/stories/Events/Event/Event.stories.jsx +0 -21
- package/src/stories/Events/EventsList/EventsList.stories.jsx +0 -25
- package/src/stories/Forms/AddPhoto/AddPhoto.stories.jsx +0 -37
- package/src/stories/Forms/AddSong/AddSong.stories.jsx +0 -26
- package/src/stories/Forms/AddVideo/AddVideo.stories.jsx +0 -20
- package/src/stories/Forms/Create-Profile/CreateProfile.stories.jsx +0 -36
- package/src/stories/Forms/Create-Profile/subcomponents/LogoUploader.stories.jsx +0 -27
- package/src/stories/Forms/Create-Profile/subcomponents/ProfilePhoto.stories.jsx +0 -26
- package/src/stories/Forms/Create-Profile/subcomponents/ResetBtn.stories.jsx +0 -18
- package/src/stories/Forms/CreateAlbum/CreateAlbum.stories.jsx +0 -37
- package/src/stories/Forms/CreateAnnouncementForm/CreateAnnouncementForm.stories.jsx +0 -44
- package/src/stories/Forms/CreateMusicAlbum/CreateMusicAlbum.stories.jsx +0 -38
- package/src/stories/Forms/CreateProfile/CreateProfile.stories.js +0 -10
- package/src/stories/Forms/CreateProfile-3/CreateProfile.stories.js +0 -10
- package/src/stories/Forms/CreateUser/CreateUser.stories.js +0 -10
- package/src/stories/Forms/CreateVideoAlbum/CreateVideoAlbum.stories.jsx +0 -23
- package/src/stories/Forms/Form/Form.stories.js +0 -10
- package/src/stories/Forms/NewProfile/NewProfile.stories.jsx +0 -10
- package/src/stories/Layout/Body/Body.stories.js +0 -26
- package/src/stories/Layout/Center/Center.stories.js +0 -14
- package/src/stories/Layout/Head/Head.stories.js +0 -10
- package/src/stories/Layout/Left/Left.stories.js +0 -14
- package/src/stories/Layout/Right/Right.stories.js +0 -14
- package/src/stories/Library/CreateFolder/CreateFolder.stories.jsx +0 -32
- package/src/stories/Library/Folders/Folders.stories.jsx +0 -34
- package/src/stories/Library/Notes/Notes.stories.jsx +0 -24
- package/src/stories/Library/ViewNote/ViewNote.stories.jsx +0 -16
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.stories.jsx +0 -60
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.stories.jsx +0 -57
- package/src/stories/Navbar/Navbar.stories.js +0 -25
- package/src/stories/Pages/Blank/Blank.stories.js +0 -10
- package/src/stories/Pages/Centered/Centered.stories.js +0 -14
- package/src/stories/Pages/Chat/Chat.stories.jsx +0 -53
- package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.stories.jsx +0 -8
- package/src/stories/Pages/Enrollment/FillForm/FillForm.stories.jsx +0 -8
- package/src/stories/Pages/Enrollment/Forms/Forms.stories.jsx +0 -8
- package/src/stories/Pages/Events/Event/Event.stories.jsx +0 -8
- package/src/stories/Pages/Events/Events/Events.stories.jsx +0 -8
- package/src/stories/Pages/Library/Folders/Library.stories.jsx +0 -8
- package/src/stories/Pages/Library/Notes/Notes.stories.jsx +0 -8
- package/src/stories/Pages/Music/MusicAlbum/Music.stories.jsx +0 -8
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.stories.jsx +0 -8
- package/src/stories/Pages/Photos/Album/Album.stories.jsx +0 -8
- package/src/stories/Pages/Photos/Albums/Albums.stories.jsx +0 -8
- package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.stories.jsx +0 -8
- package/src/stories/Pages/Video/VideoAlbum/Video.stories.jsx +0 -8
- package/src/stories/Pages/ViewWorld/ViewWorld.stories.js +0 -270
- package/src/stories/Photo Album/DetailedPhoto/DetailedPhoto.stories.jsx +0 -20
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.stories.jsx +0 -60
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.stories.jsx +0 -59
- package/src/stories/Reusable Components/Cards/Card-style-1/CardStyle1.stories.jsx +0 -22
- package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.stories.jsx +0 -21
- package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.stories.jsx +0 -21
- package/src/stories/Reusable Components/Cards/Card-style-2/CardStyle2.stories.jsx +0 -24
- package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.stories.jsx +0 -22
- package/src/stories/Reusable Components/Cards/Card-style-4/CardStyle4.stories.jsx +0 -25
- package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.stories.jsx +0 -9
- package/src/stories/Reusable Components/Cards/Card-style-7/CardStyle7.stories.jsx +0 -23
- package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.stories.jsx +0 -29
- package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.stories.jsx +0 -14
- package/src/stories/Reusable Components/Cards/Card.stories.jsx +0 -118
- package/src/stories/Reusable Components/Controls/Controls.stories.jsx +0 -24
- package/src/stories/Reusable Components/Gallery/Gallery.stories.jsx +0 -43
- package/src/stories/Reusable Components/Lists/Cards/ListCard-1.stories.js +0 -0
- package/src/stories/Reusable Components/Lists/List.stories.js +0 -0
- package/src/stories/Reusable Components/Mention/Mention.stories.jsx +0 -55
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.stories.jsx +0 -167
- package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.stories.jsx +0 -22
- package/src/stories/Reusable Components/ReusableList/ReusableList.stories.jsx +0 -70
- package/src/stories/Reusable Components/SearchCard/SearchCard.stories.js +0 -10
- package/src/stories/Reusable Components/SpaceContainer/SpaceContainer.stories.jsx +0 -78
- package/src/stories/Reusable Components/Spinner/Spinner.stories.jsx +0 -8
- package/src/stories/Reusable Components/WidgetContainer/WidgetContainer.stories.jsx +0 -61
- package/src/stories/Spaces/WelcomeSpace/WelcomeSpace.stories.js +0 -10
- package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.stories.jsx +0 -59
- package/src/stories/VideoAlbum/Comments/Comments.stories.jsx +0 -18
- package/src/stories/VideoAlbum/VideoPlayer/VideoPlayer.stories.jsx +0 -82
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.stories.jsx +0 -23
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.stories.jsx +0 -57
- package/src/stories/Widgets/LogoWidget/LogoWidget.stories.js +0 -12
- package/src/stories/Widgets/MusicPlayer/MusicPlayer.stories.jsx +0 -23
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.stories.jsx +0 -33
- package/src/stories/Widgets/SpacesList/SpacesList.stories.jsx +0 -27
- package/src/stories/Widgets/SpacesList/SpacesListItem.stories.jsx +0 -10
- package/src/stories/assets/images/album1.jpg +0 -0
- package/src/stories/assets/images/album2.jpg +0 -0
- package/src/stories/assets/images/album3.jpg +0 -0
- package/src/stories/assets/images/album4.jpg +0 -0
- package/src/stories/assets/images/album5.jpg +0 -0
- package/src/stories/assets/images/album6.jpg +0 -0
- package/src/stories/assets/images/art.jpg +0 -0
- package/src/stories/assets/images/dance.jpg +0 -0
- package/src/stories/assets/images/football.jpg +0 -0
- package/src/stories/assets/images/music.jpg +0 -0
- package/src/stories/assets/images/music1.jpg +0 -0
- package/src/stories/assets/images/music2.jpg +0 -0
- package/src/stories/assets/images/music3.jpg +0 -0
- package/src/stories/assets/images/music4.jpg +0 -0
- package/src/stories/assets/images/music5.jpg +0 -0
- package/src/stories/assets/images/music6.jpg +0 -0
- package/src/stories/assets/images/reset.png +0 -0
- package/src/stories/assets/images/robotics.jpg +0 -0
- package/src/stories/assets/images/tennis.jpg +0 -0
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import ViewAlbum from "./ViewAlbum";
|
|
3
|
-
import { deleteFromArrayByIndex, addObjectToArray } from '../../helpers/util';
|
|
4
|
-
|
|
5
|
-
import img1 from '../../assets/images/album1.jpg';
|
|
6
|
-
import img2 from '../../assets/images/album2.jpg';
|
|
7
|
-
import img3 from '../../assets/images/album3.jpg';
|
|
8
|
-
import img4 from '../../assets/images/album4.jpg';
|
|
9
|
-
import img5 from '../../assets/images/album5.jpg';
|
|
10
|
-
import img6 from '../../assets/images/album6.jpg';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
title: 'Photo Album/View Album',
|
|
15
|
-
component: ViewAlbum
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const Album = args => {
|
|
19
|
-
const [album, setAlbum] = useState([
|
|
20
|
-
{ index: 0, img: img5, title: 'Image 1', description: 'This is description test', date: '2021-11-30' },
|
|
21
|
-
{ index: 1, img: img3, title: 'Image 2', description: 'This is description test', date: '2021-11-30' },
|
|
22
|
-
{ index: 2, img: img6, title: 'Image 3', description: 'This is description test', date: '2021-11-30' },
|
|
23
|
-
{ index: 3, img: img2, title: 'Image 4', description: 'This is description test', date: '2021-11-30' },
|
|
24
|
-
{ index: 4, img: img1, title: 'Image 5', description: 'This is description test', date: '2021-11-30' },
|
|
25
|
-
{ index: 5, img: img4, title: 'Image 6', description: 'This is description test', date: '2021-11-30' },
|
|
26
|
-
])
|
|
27
|
-
|
|
28
|
-
const onAddPhoto = (photo) => {
|
|
29
|
-
const newImg = {
|
|
30
|
-
img: photo.cover.meta.previewUrl,
|
|
31
|
-
title: photo.title,
|
|
32
|
-
description: photo.description,
|
|
33
|
-
date: photo.date
|
|
34
|
-
}
|
|
35
|
-
setAlbum(addObjectToArray(album, newImg))
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const cardIconClicked = (action, index) => {
|
|
39
|
-
switch (action) {
|
|
40
|
-
case 'delete':
|
|
41
|
-
onDeletePhoto(index)
|
|
42
|
-
break;
|
|
43
|
-
default:
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const onDeletePhoto = (index) => {
|
|
49
|
-
setAlbum(deleteFromArrayByIndex(album, index))
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<ViewAlbum
|
|
54
|
-
album={album}
|
|
55
|
-
addPhoto={onAddPhoto}
|
|
56
|
-
deletePhoto={onDeletePhoto}
|
|
57
|
-
cardIconClicked={cardIconClicked}
|
|
58
|
-
{...args} />
|
|
59
|
-
)
|
|
60
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import ViewAlbums from './ViewAlbums';
|
|
3
|
-
import { deleteFromArrayByIndex, addObjectToArray } from '../../helpers/util';
|
|
4
|
-
|
|
5
|
-
import img1 from '../../assets/images/album1.jpg';
|
|
6
|
-
import img2 from '../../assets/images/album2.jpg';
|
|
7
|
-
import img3 from '../../assets/images/album3.jpg';
|
|
8
|
-
import img4 from '../../assets/images/album4.jpg';
|
|
9
|
-
import img5 from '../../assets/images/album5.jpg';
|
|
10
|
-
import img6 from '../../assets/images/album6.jpg';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
title: 'Photo Album/Albums/Albums',
|
|
15
|
-
component: ViewAlbums
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const Albums = args => {
|
|
19
|
-
const [albums, setAlbums] = useState([
|
|
20
|
-
{ img: img1, title: 'Album 1', count: '24' },
|
|
21
|
-
{ img: img2, title: 'Album 2', count: '24' },
|
|
22
|
-
{ img: img3, title: 'Album 3', count: '24' },
|
|
23
|
-
{ img: img4, title: 'Album 4', count: '24' },
|
|
24
|
-
{ img: img5, title: 'Album 5', count: '24' },
|
|
25
|
-
{ img: img6, title: 'Album 6', count: '24' },
|
|
26
|
-
])
|
|
27
|
-
|
|
28
|
-
const cardIconClicked = (action, index) => {
|
|
29
|
-
switch (action) {
|
|
30
|
-
case 'delete':
|
|
31
|
-
onDeleteAlbum(index)
|
|
32
|
-
break;
|
|
33
|
-
default:
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const onDeleteAlbum = (index) => {
|
|
39
|
-
setAlbums(deleteFromArrayByIndex(albums, index))
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const onAddAlbum = (album) => {
|
|
43
|
-
const newAlbum = {
|
|
44
|
-
img: album.cover.meta.previewUrl,
|
|
45
|
-
title: album.title,
|
|
46
|
-
count: '55'
|
|
47
|
-
}
|
|
48
|
-
setAlbums(addObjectToArray(albums, newAlbum))
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<ViewAlbums
|
|
53
|
-
albums={albums}
|
|
54
|
-
cardIconClicked={cardIconClicked}
|
|
55
|
-
onDeleteAlbum={onDeleteAlbum}
|
|
56
|
-
onAddAlbum={onAddAlbum}
|
|
57
|
-
{...args} />
|
|
58
|
-
)
|
|
59
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CardStyle1 from './CardStyle1';
|
|
3
|
-
|
|
4
|
-
import { cardControls } from '../../fakeData'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Reusable Components/Cards/Card style 1',
|
|
8
|
-
component: CardStyle1
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Card = args => (
|
|
12
|
-
<CardStyle1
|
|
13
|
-
img='https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png'
|
|
14
|
-
title="Card Style 1"
|
|
15
|
-
description="Card style 1 description test"
|
|
16
|
-
cardControls={cardControls}
|
|
17
|
-
controlsStyles={{
|
|
18
|
-
iconColor: 'black',
|
|
19
|
-
showOnHover: true,
|
|
20
|
-
}}
|
|
21
|
-
{...args}
|
|
22
|
-
/>)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import CardStyle10 from "./CardStyle10";
|
|
2
|
-
import { AiOutlineHeart, AiOutlineAudioMuted } from "react-icons/ai";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Reusable Components/Cards/Card style 10',
|
|
7
|
-
component: CardStyle10
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const cardControls = [
|
|
11
|
-
{ icon: (<AiOutlineHeart />), action: 'like', name: 'Add member' },
|
|
12
|
-
{ icon: (<AiOutlineAudioMuted />), action: 'mute', name: 'Add member' },
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
export const Card = args => (
|
|
16
|
-
<CardStyle10
|
|
17
|
-
title="Folder"
|
|
18
|
-
description="Folder description test"
|
|
19
|
-
cardControls={cardControls}
|
|
20
|
-
{...args}
|
|
21
|
-
/>)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import CardStyle11 from "./CardStyle11";
|
|
2
|
-
import { AiOutlineHeart, AiOutlineAudioMuted } from "react-icons/ai";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Reusable components/Cards/Card Style 11',
|
|
6
|
-
component: CardStyle11
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const cardControls = [
|
|
10
|
-
{ icon: (<AiOutlineHeart />), action: 'like', name: 'Add member' },
|
|
11
|
-
{ icon: (<AiOutlineAudioMuted />), action: 'mute', name: 'Add member' },
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
export const Card = args => <CardStyle11
|
|
15
|
-
title="Study Notes"
|
|
16
|
-
date="15/11/2021"
|
|
17
|
-
cardControls={cardControls}
|
|
18
|
-
controlsStyles={{
|
|
19
|
-
iconColor: 'black'
|
|
20
|
-
}}
|
|
21
|
-
{...args} />
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CardStyle2 from './CardStyle2';
|
|
3
|
-
|
|
4
|
-
import { cardControls } from '../../fakeData'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Reusable Components/Cards/Card style 2',
|
|
8
|
-
component: CardStyle2
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Card = args => (
|
|
12
|
-
<CardStyle2
|
|
13
|
-
img='https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png'
|
|
14
|
-
title="Card Style 2"
|
|
15
|
-
description="Card style 2 description test"
|
|
16
|
-
cardControls={cardControls}
|
|
17
|
-
darkOnHover={true}
|
|
18
|
-
controlsStyles={{
|
|
19
|
-
iconColor: 'black',
|
|
20
|
-
position: 'center',
|
|
21
|
-
showOnHover: true
|
|
22
|
-
}}
|
|
23
|
-
{...args}
|
|
24
|
-
/>)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CardStyle3 from './CardStyle3';
|
|
3
|
-
|
|
4
|
-
import { cardControls } from '../../fakeData'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Reusable Components/Cards/Card style 3',
|
|
9
|
-
component: CardStyle3
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const Card = args => (
|
|
13
|
-
<CardStyle3
|
|
14
|
-
img='https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png'
|
|
15
|
-
title="Card Style 3"
|
|
16
|
-
description="Card style 3 description test"
|
|
17
|
-
cardControls={cardControls}
|
|
18
|
-
controlsStyles={{
|
|
19
|
-
iconColor: 'black'
|
|
20
|
-
}}
|
|
21
|
-
{...args}
|
|
22
|
-
/>)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CardStyle4 from './CardStyle4';
|
|
3
|
-
|
|
4
|
-
import { cardControls } from '../../fakeData'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Reusable Components/Cards/Card style 4',
|
|
8
|
-
component: CardStyle4
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const Card = args => (
|
|
12
|
-
<CardStyle4
|
|
13
|
-
img='https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png'
|
|
14
|
-
title="Card Style 4"
|
|
15
|
-
description="Card style 4 description test"
|
|
16
|
-
cardControls={cardControls}
|
|
17
|
-
darkOnHover={true}
|
|
18
|
-
controlsStyles={{
|
|
19
|
-
iconColor: 'black',
|
|
20
|
-
position: 'center',
|
|
21
|
-
showOnHover: true,
|
|
22
|
-
iconColor: 'red'
|
|
23
|
-
}}
|
|
24
|
-
{...args}
|
|
25
|
-
/>)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import CardStyle6 from "./CardStyle6";
|
|
2
|
-
import img from '../../../assets/images/album1.jpg'
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Reusable Components/cards/Card style 6',
|
|
6
|
-
component: CardStyle6
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const Card = args => <CardStyle6 img={img} title="Test" {...args}/>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CardStyle7 from './CardStyle7';
|
|
3
|
-
import { cardControls } from '../../fakeData'
|
|
4
|
-
|
|
5
|
-
import img4 from '../../../assets/images/music4.jpg';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Reusable Components/Cards/Card style 7',
|
|
9
|
-
component: CardStyle7
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const Card = args => (
|
|
13
|
-
<CardStyle7
|
|
14
|
-
img={img4}
|
|
15
|
-
title="Card Style 7"
|
|
16
|
-
description="Card style 7 description test"
|
|
17
|
-
time="5:10"
|
|
18
|
-
cardControls={cardControls}
|
|
19
|
-
controlsStyles={{
|
|
20
|
-
iconColor: 'black',
|
|
21
|
-
}}
|
|
22
|
-
{...args}
|
|
23
|
-
/>)
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import CardStyle8 from './CardStyle8';
|
|
2
|
-
|
|
3
|
-
import { controls } from '../../fakeData'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Reusable Components/Cards/Card style 8',
|
|
7
|
-
component: CardStyle8
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Card = args => (
|
|
11
|
-
<CardStyle8
|
|
12
|
-
img='https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png'
|
|
13
|
-
username="Card Style 8"
|
|
14
|
-
date="15/12/2021"
|
|
15
|
-
text="Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test Card style 8 description test "
|
|
16
|
-
cardControls={controls}
|
|
17
|
-
media={(<img src="https://arabhardware.net/wp-content/uploads/2020/03/valorant-2020-4k-0f-scaled.jpg"/>)}
|
|
18
|
-
controlsStyles={{
|
|
19
|
-
iconColor: 'black',
|
|
20
|
-
showOnHover: true,
|
|
21
|
-
position: 'absolute',
|
|
22
|
-
iconBackground: '#414141',
|
|
23
|
-
iconSize: 18,
|
|
24
|
-
iconColor: 'white',
|
|
25
|
-
dropdownBackground: '#414141',
|
|
26
|
-
dropdownFontColor: 'white'
|
|
27
|
-
}}
|
|
28
|
-
{...args}
|
|
29
|
-
/>)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import CardStyle9 from "./CardStyle9";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Reusable Components/Cards/Card style 9',
|
|
5
|
-
component: CardStyle9
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const Card = args =>
|
|
9
|
-
<CardStyle9
|
|
10
|
-
img='https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png'
|
|
11
|
-
username="User Name"
|
|
12
|
-
answered={'3/4'}
|
|
13
|
-
status="pending"
|
|
14
|
-
{...args} />
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Card from './Card';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Reusable Components/Cards/Regular Card',
|
|
6
|
-
component: Card,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const Template = (args) => <Card {...args} />;
|
|
10
|
-
|
|
11
|
-
export const CardWithImage = Template.bind({});
|
|
12
|
-
CardWithImage.args = {
|
|
13
|
-
title: 'Card with image',
|
|
14
|
-
description: 'Lorem ipsum dolor sit amet consectetur.',
|
|
15
|
-
img: 'https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png',
|
|
16
|
-
cardBackgroundColor: '#f1d6d6',
|
|
17
|
-
cardRadius: '20',
|
|
18
|
-
cardTitleFontSize: '',
|
|
19
|
-
cardTitleColor: '',
|
|
20
|
-
cardImageRadius: '100',
|
|
21
|
-
cardDescriptionFontSize: '',
|
|
22
|
-
cardDescriptionColor: '',
|
|
23
|
-
cardDirection: '',
|
|
24
|
-
cardPadding: '10',
|
|
25
|
-
imgSize: '90',
|
|
26
|
-
cardBorderSize: '',
|
|
27
|
-
cardBorderColor: '',
|
|
28
|
-
controlsStyles: {
|
|
29
|
-
showOnHover: true,
|
|
30
|
-
iconBackground: "#272727",
|
|
31
|
-
dropdownBackground: "#272727",
|
|
32
|
-
dropdownFontColor: "white",
|
|
33
|
-
dropdownItemHoverColor: "#414141",
|
|
34
|
-
iconBackgroundHover: "#414141"
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const CardWithImageColumn = Template.bind({});
|
|
39
|
-
CardWithImageColumn.args = {
|
|
40
|
-
title: 'Card with image column',
|
|
41
|
-
description: 'Lorem ipsum dolor sit amet consectetur.',
|
|
42
|
-
img: 'https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png',
|
|
43
|
-
cardBackgroundColor: '#f1d6d6',
|
|
44
|
-
cardRadius: '20',
|
|
45
|
-
cardTitleFontSize: '',
|
|
46
|
-
cardTitleColor: '',
|
|
47
|
-
cardImageRadius: '100',
|
|
48
|
-
cardDescriptionFontSize: '',
|
|
49
|
-
cardDescriptionColor: '',
|
|
50
|
-
cardDirection: 'column',
|
|
51
|
-
cardPadding: '10',
|
|
52
|
-
imgSize: '90',
|
|
53
|
-
cardBorderSize: '',
|
|
54
|
-
cardBorderColor: '',
|
|
55
|
-
controlsStyles: {
|
|
56
|
-
showOnHover: true,
|
|
57
|
-
iconBackground: "#272727",
|
|
58
|
-
dropdownBackground: "#272727",
|
|
59
|
-
dropdownFontColor: "white",
|
|
60
|
-
dropdownItemHoverColor: "#414141",
|
|
61
|
-
iconBackgroundHover: "#414141"
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const CardWithoutImage = Template.bind({});
|
|
66
|
-
CardWithoutImage.args = {
|
|
67
|
-
title: 'Card with image',
|
|
68
|
-
description: 'Lorem ipsum dolor sit amet consectetur.',
|
|
69
|
-
img: '',
|
|
70
|
-
cardBackgroundColor: '#f1d6d6',
|
|
71
|
-
cardRadius: '20',
|
|
72
|
-
cardTitleFontSize: '',
|
|
73
|
-
cardTitleColor: '',
|
|
74
|
-
cardImageRadius: '100',
|
|
75
|
-
cardDescriptionFontSize: '',
|
|
76
|
-
cardDescriptionColor: '',
|
|
77
|
-
cardDirection: '',
|
|
78
|
-
cardPadding: '10',
|
|
79
|
-
imgSize: '90',
|
|
80
|
-
cardBorderSize: '',
|
|
81
|
-
cardBorderColor: '',
|
|
82
|
-
controlsStyles: {
|
|
83
|
-
showOnHover: true,
|
|
84
|
-
iconBackground: "#272727",
|
|
85
|
-
dropdownBackground: "#272727",
|
|
86
|
-
dropdownFontColor: "white",
|
|
87
|
-
dropdownItemHoverColor: "#414141",
|
|
88
|
-
iconBackgroundHover: "#414141"
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export const CardWithoutImageColumn = Template.bind({});
|
|
93
|
-
CardWithoutImageColumn.args = {
|
|
94
|
-
title: 'Card with image column',
|
|
95
|
-
description: 'Lorem ipsum dolor sit amet consectetur.',
|
|
96
|
-
img: '',
|
|
97
|
-
cardBackgroundColor: '#f1d6d6',
|
|
98
|
-
onHoverBackgroundColor: '',
|
|
99
|
-
cardRadius: '20',
|
|
100
|
-
cardTitleFontSize: '',
|
|
101
|
-
cardTitleColor: '',
|
|
102
|
-
cardImageRadius: '100',
|
|
103
|
-
cardDescriptionFontSize: '',
|
|
104
|
-
cardDescriptionColor: '',
|
|
105
|
-
cardDirection: 'column',
|
|
106
|
-
cardPadding: '10',
|
|
107
|
-
imgSize: '90',
|
|
108
|
-
cardBorderSize: '',
|
|
109
|
-
cardBorderColor: '',
|
|
110
|
-
controlsStyles: {
|
|
111
|
-
showOnHover: true,
|
|
112
|
-
iconBackground: "#272727",
|
|
113
|
-
dropdownBackground: "#272727",
|
|
114
|
-
dropdownFontColor: "white",
|
|
115
|
-
dropdownItemHoverColor: "#414141",
|
|
116
|
-
iconBackgroundHover: "#414141"
|
|
117
|
-
}
|
|
118
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Controls from './Controls';
|
|
3
|
-
|
|
4
|
-
import { AiOutlineUserAdd, AiOutlineDelete } from "react-icons/ai";
|
|
5
|
-
import { IoIosAirplane, IoIosAlarm } from "react-icons/io";
|
|
6
|
-
|
|
7
|
-
const controls = [
|
|
8
|
-
{ icon: (<AiOutlineUserAdd />), action: 'add', name: 'Add member' },
|
|
9
|
-
{ icon: (<AiOutlineDelete />), action: 'remove', name: 'Add member' },
|
|
10
|
-
{ icon: (<IoIosAirplane />), action: 'add', name: 'Some Icon' },
|
|
11
|
-
{ icon: (<IoIosAlarm />), action: 'remove', name: 'Another Icons' },
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
title: 'reusable Components/Controls',
|
|
16
|
-
component: Controls
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const Template = (args) => <Controls {...args} />;
|
|
20
|
-
|
|
21
|
-
export const fixedControls = Template.bind({});
|
|
22
|
-
fixedControls.args = {
|
|
23
|
-
controls,
|
|
24
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import Gallery from './Gallery';
|
|
4
|
-
// Data
|
|
5
|
-
import { controls, data, dataWithSections, cardControls } from '../fakeData';
|
|
6
|
-
// Styles
|
|
7
|
-
import { headingControlsStyles, galleryCardControlsStyles } from '../commonStyles';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Reusable components/Gallery',
|
|
11
|
-
component: Gallery
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const Template = (args) => (
|
|
15
|
-
<Gallery
|
|
16
|
-
galleryTitle="Reusable Gallery"
|
|
17
|
-
galleryControls={controls}
|
|
18
|
-
headerStyles={{
|
|
19
|
-
padding: 10,
|
|
20
|
-
headerBackground: '#FE1744',
|
|
21
|
-
titleColor: '#ffff',
|
|
22
|
-
}}
|
|
23
|
-
columnsNumber={3}
|
|
24
|
-
galleryColumnGap={10}
|
|
25
|
-
controlsStyles={headingControlsStyles}
|
|
26
|
-
cardStyle="card-style-6"
|
|
27
|
-
customCardStyles={galleryCardControlsStyles}
|
|
28
|
-
{...args} />
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
export const GalleryFlat = Template.bind({});
|
|
32
|
-
GalleryFlat.args = {
|
|
33
|
-
data: data,
|
|
34
|
-
type: "flat",
|
|
35
|
-
cardControls: cardControls
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const GallerySectioned = Template.bind({});
|
|
39
|
-
GallerySectioned.args = {
|
|
40
|
-
data: dataWithSections,
|
|
41
|
-
type: "sectioned",
|
|
42
|
-
cardControls: cardControls
|
|
43
|
-
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import Mention from "./Mention";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Resuable Components/Mention',
|
|
6
|
-
component: Mention
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const users = [
|
|
10
|
-
{
|
|
11
|
-
id: 'walter',
|
|
12
|
-
display: 'Walter White',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: 'jesse',
|
|
16
|
-
display: 'Jesse Pinkman',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: 'gus',
|
|
20
|
-
display: 'Gustavo "Gus" Fring',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 'saul',
|
|
24
|
-
display: 'Saul Goodman',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 'hank',
|
|
28
|
-
display: 'Hank Schrader',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: 'skyler',
|
|
32
|
-
display: 'Skyler White',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'mike',
|
|
36
|
-
display: 'Mike Ehrmantraut',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: 'lydia',
|
|
40
|
-
display: 'Lydìã Rôdarté-Qüayle',
|
|
41
|
-
},
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
export const MentionArea = args => {
|
|
45
|
-
const [value, setValue] = useState('');
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Mention
|
|
49
|
-
value={value}
|
|
50
|
-
handleOnChange={(value) => setValue(value)}
|
|
51
|
-
users={users}
|
|
52
|
-
{...args}
|
|
53
|
-
/>
|
|
54
|
-
)
|
|
55
|
-
}
|