Browse Source

refactored FileItem.jsx and FileItemHeader.jsx into ContentItem and ContentItemHeader

Skylsmoi 6 years ago
parent
commit
53c9f9a315

+ 7 - 7
src/component/Workspace/ContentItem.jsx View File

44
   })()
44
   })()
45
 
45
 
46
   return (
46
   return (
47
-    <div className={classnames('file', 'align-items-center', {'item-last': props.isLast}, props.customClass)} onClick={props.onClickItem}>
48
-      <div className='file__type'>
47
+    <div className={classnames('content', 'align-items-center', {'item-last': props.isLast}, props.customClass)} onClick={props.onClickItem}>
48
+      <div className='content__type'>
49
         <i className={props.icon} />
49
         <i className={props.icon} />
50
       </div>
50
       </div>
51
 
51
 
52
-      <div className='file__name'>
53
-        <div className='file__name__text'>
52
+      <div className='content__name'>
53
+        <div className='content__name__text'>
54
           { props.name }
54
           { props.name }
55
         </div>
55
         </div>
56
       </div>
56
       </div>
59
         <BtnExtandedAction onClickExtendedAction={props.onClickExtendedAction} />
59
         <BtnExtandedAction onClickExtendedAction={props.onClickExtendedAction} />
60
       </div>
60
       </div>
61
 
61
 
62
-      <div className={classnames('file__status d-flex align-items-center justify-content-start') + colorStatus}>
63
-        <div className='file__status__icon d-block '>
62
+      <div className={classnames('content__status d-flex align-items-center justify-content-start') + colorStatus}>
63
+        <div className='content__status__icon d-block '>
64
           <i className={iconStatus} />
64
           <i className={iconStatus} />
65
         </div>
65
         </div>
66
-        <div className='file__status__text d-none d-xl-block'>
66
+        <div className='content__status__text d-none d-xl-block'>
67
           {textStatus}
67
           {textStatus}
68
         </div>
68
         </div>
69
       </div>
69
       </div>

+ 4 - 4
src/component/Workspace/ContentItemHeader.jsx View File

3
 
3
 
4
 const FileItemHeader = props => {
4
 const FileItemHeader = props => {
5
   return (
5
   return (
6
-    <div className='file__header'>
7
-      <div className='file__header__type'>
6
+    <div className='content__header'>
7
+      <div className='content__header__type'>
8
         {props.t('FileItemHeader.type')}
8
         {props.t('FileItemHeader.type')}
9
       </div>
9
       </div>
10
-      <div className='file__header__name'>
10
+      <div className='content__header__name'>
11
         {props.t('FileItemHeader.document_name')}
11
         {props.t('FileItemHeader.document_name')}
12
       </div>
12
       </div>
13
-      <div className='file__header__status'>
13
+      <div className='content__header__status'>
14
         {props.t('FileItemHeader.status')}
14
         {props.t('FileItemHeader.status')}
15
       </div>
15
       </div>
16
     </div>
16
     </div>

src/css/FileItem.styl → src/css/ContentItem.styl View File

10
 .outdateColor
10
 .outdateColor
11
   color outdateColor
11
   color outdateColor
12
 
12
 
13
-.file
13
+.content
14
   display flex
14
   display flex
15
   align-items center
15
   align-items center
16
   padding 10px 0
16
   padding 10px 0
50
 
50
 
51
 
51
 
52
 @media (min-width: max-xs) and (max-width: max-lg)
52
 @media (min-width: max-xs) and (max-width: max-lg)
53
-  .file
53
+  .content
54
     border-right 1px solid grey
54
     border-right 1px solid grey
55
     &__name__icons
55
     &__name__icons
56
         margin-top 5px
56
         margin-top 5px

src/css/FileItemHeader.styl → src/css/ContentItemHeader.styl View File

1
-.file__header
1
+.content__header
2
   display flex
2
   display flex
3
   font-size 17px
3
   font-size 17px
4
   &__type
4
   &__type

+ 1 - 0
src/css/File.styl View File

1
+// @Côme - this file is deprecated as its associated jsx file is deprecated
1
 .wsFileFile
2
 .wsFileFile
2
   width 1200px
3
   width 1200px
3
   height calc(100% - 85px)
4
   height calc(100% - 85px)

+ 3 - 3
src/css/Folder.styl View File

3
 border-style = 1px solid secondColor
3
 border-style = 1px solid secondColor
4
 .folder__header
4
 .folder__header
5
   border border-style
5
   border border-style
6
-.folder + .file, .file + .file
6
+.folder + .content, .content + .content
7
   border-bottom 0
7
   border-bottom 0
8
-.folder__content > .file, .folder__content > .folder
8
+.folder__content > .content, .folder__content > .folder
9
   border-bottom 0
9
   border-bottom 0
10
 .folder:not(.active).item-last
10
 .folder:not(.active).item-last
11
   border-bottom border-style
11
   border-bottom border-style
12
-.file
12
+.content
13
   border border-style
13
   border border-style
14
   &.item-last
14
   &.item-last
15
     border-bottom border-style
15
     border-bottom border-style

+ 2 - 2
src/css/index.styl View File

14
 @import 'Login.styl'
14
 @import 'Login.styl'
15
 @import 'Workspace.styl'
15
 @import 'Workspace.styl'
16
 
16
 
17
-@import 'FileItem.styl'
18
-@import 'FileItemHeader.styl'
17
+@import 'ContentItem.styl'
18
+@import 'ContentItemHeader.styl'
19
 @import 'Folder.styl'
19
 @import 'Folder.styl'
20
 
20
 
21
 @import 'File.styl'
21
 @import 'File.styl'