Browse Source

delete input text in responsive to keep the same textarea

AlexiCauvin 6 years ago
parent
commit
e4c8ff067f
2 changed files with 27 additions and 26 deletions
  1. 1 13
      src/component/Timeline/Timeline.jsx
  2. 26 13
      src/component/Timeline/Timeline.styl

+ 1 - 13
src/component/Timeline/Timeline.jsx View File

@@ -71,19 +71,7 @@ const Timeline = props => {
71 71
       </ul>
72 72
 
73 73
       <form className={classnames(`${props.customClass}__texteditor`, 'timeline__texteditor')}>
74
-        <div
75
-          className={classnames(`${props.customClass}__texteditor__simpletext`, 'timeline__texteditor__simpletext input-group d-inline-flex d-sm-inline-flex d-md-inline-flex d-lg-none')}>
76
-          <input
77
-            type='text'
78
-            className={classnames(`${props.customClass}__texteditor__simpletext__input`, 'timeline__texteditor__simpletext__input form-control')}
79
-            placeholder='...'
80
-          />
81
-          <div
82
-            className={classnames(`${props.customClass}__texteditor__simpletext__icon`, 'timeline__texteditor__simpletext__icon input-group-addon')}>
83
-            <i className='fa fa-font' />
84
-          </div>
85
-        </div>
86
-        <div className={classnames(`${props.customClass}__texteditor__wysiwyg`, 'timeline__texteditor__wysiwyg d-none d-lg-block')}>
74
+        <div className={classnames(`${props.customClass}__texteditor__wysiwyg`, 'timeline__texteditor__wysiwyg')}>
87 75
           <textarea />
88 76
         </div>
89 77
         <div className={classnames(`${props.customClass}__texteditor__submit`, 'timeline__texteditor__submit d-inline-flex d-lg-flex justify-content-lg-center')}>

+ 26 - 13
src/component/Timeline/Timeline.styl View File

@@ -67,11 +67,6 @@
67 67
   &__texteditor
68 68
     flex 0 1 auto
69 69
     padding 2px
70
-    &__simpletext
71
-      display none
72
-      width 70%
73
-      &__icon
74
-        cursor pointer
75 70
     &__wysiwyg
76 71
       display block
77 72
       & > textarea
@@ -114,16 +109,34 @@
114 109
 
115 110
 @media (min-width: min-sm) and (max-width: max-sm)
116 111
 
117
-  .timeline__messagelist__item
118
-    margin-right 35px
112
+  .timeline
113
+    &__messagelist__item
114
+      margin-right 35px
115
+    &__texteditor
116
+      display flex
117
+      align-items center
118
+      &__wysiwyg
119
+        width 70%
120
+        & > textarea
121
+          border-radius 5px
122
+          height 40px
123
+      &__submit
124
+        width 30%
125
+        margin-left 10px
119 126
 
120 127
 /**** MEDIA 575px ****/
121 128
 
122 129
 @media (max-width: max-xs)
123 130
 
124
-  .timeline__texteditor
125
-    &__simpletext
126
-      margin-left 0
127
-      width 65%
128
-    &__submit
129
-      margin-left 10px
131
+  .timeline
132
+    &__texteditor
133
+      display flex
134
+      align-items center
135
+      &__wysiwyg
136
+        width 70%
137
+        & > textarea
138
+          border-radius 5px
139
+          height 40px
140
+      &__submit
141
+        width 30%
142
+        margin-left 10px