Просмотр исходного кода

added TextAreaPlugin + refactored .styl files into their own folders

Skylsmoi 6 лет назад
Родитель
Сommit
3e698c2181

+ 11 - 0
src/component/Input/TextAreaPlugin.jsx Просмотреть файл

@@ -0,0 +1,11 @@
1
+import React from 'react'
2
+
3
+require('./TextAreaPlugin.styl')
4
+
5
+export const TextAreaPlugin = props =>
6
+  <form className={`${props.customClass} editionmode`}>
7
+    <textarea className={`${props.customClass}__text editionmode__text`} />
8
+    <input type='submit' className={`${props.customClass}__submit editionmode__submit`} value='Valider' />
9
+  </form>
10
+
11
+export default TextAreaPlugin

+ 23 - 0
src/component/Input/TextAreaPlugin.styl Просмотреть файл

@@ -0,0 +1,23 @@
1
+@import '../../css/Variable.styl'
2
+
3
+.editiontitle
4
+  width 60%
5
+
6
+.editionmode
7
+  display flex
8
+  flex-direction column
9
+  align-items center
10
+  &__text
11
+    margin-bottom 25px
12
+    width 100%
13
+    height 400px
14
+  &__submit
15
+    border 1px solid blue
16
+    box-shadow none
17
+    border-radius 10px
18
+    padding 8px 45px
19
+    background-color transparent
20
+    color blue
21
+    &:hover, &:focus
22
+      background-color blue
23
+      color off-white

+ 1 - 1
src/component/PopinFixed/PopinFixed.jsx Просмотреть файл

@@ -5,7 +5,7 @@ import PopinFixedHeader from './PopinFixedHeader.jsx'
5 5
 import PopinFixedOption from './PopinFixedOption.jsx'
6 6
 import PopinFixedContent from './PopinFixedContent.jsx'
7 7
 
8
-require('../../css/PopinFixed.styl')
8
+require('./PopinFixed.styl')
9 9
 
10 10
 const PopinFixed = props => {
11 11
   return (

src/css/PopinFixed.styl → src/component/PopinFixed/PopinFixed.styl Просмотреть файл

@@ -1,4 +1,4 @@
1
-@import './Variable.styl'
1
+@import '../../css/Variable.styl'
2 2
 
3 3
 .wsFileGeneric
4 4
   position fixed

src/component/Timeline.jsx → src/component/Timeline/Timeline.jsx Просмотреть файл

@@ -1,9 +1,9 @@
1 1
 import React from 'react'
2 2
 import classnames from 'classnames'
3
-import imgProfil from '../img/imgProfil.png'
4
-import imgProfilReverse from '../img/imgProfil-reverse.png'
3
+import imgProfil from '../../img/imgProfil.png'
4
+import imgProfilReverse from '../../img/imgProfil-reverse.png'
5 5
 
6
-require('../css/Timeline.styl')
6
+require('./Timeline.styl')
7 7
 
8 8
 const Timeline = props => {
9 9
   return (

src/css/Timeline.styl → src/component/Timeline/Timeline.styl Просмотреть файл

@@ -1,4 +1,4 @@
1
-@import './Variable.styl'
1
+@import '../../css/Variable.styl'
2 2
 
3 3
 .timeline
4 4
   display flex

+ 7 - 2
src/index.dev.js Просмотреть файл

@@ -6,7 +6,9 @@ import PopinFixedHeader from './component/PopinFixed/PopinFixedHeader.jsx'
6 6
 import PopinFixedOption from './component/PopinFixed/PopinFixedOption.jsx'
7 7
 import PopinFixedContent from './component/PopinFixed/PopinFixedContent.jsx'
8 8
 
9
-import Timeline from './component/Timeline.jsx'
9
+import TextAreaPlugin from './component/Input/TextAreaPlugin.jsx'
10
+
11
+import Timeline from './component/Timeline/Timeline.jsx'
10 12
 
11 13
 ReactDOM.render(
12 14
   <PopinFixed customClass={`${'randomClass'}`}>
@@ -20,7 +22,10 @@ ReactDOM.render(
20 22
     <PopinFixedOption customClass={`${'randomClass'}`} />
21 23
 
22 24
     <PopinFixedContent customClass={`${'randomClass'}__contentpage`}>
23
-      <div>Here will be the plugin content. Style is handled by the plugin (obviously)</div>
25
+      <div>
26
+        <span>Here will be the plugin content. Style is handled by the plugin (obviously)</span>
27
+        <TextAreaPlugin customClass={'randomClass'} />
28
+      </div>
24 29
 
25 30
       <Timeline
26 31
         customClass={`${'randomClass'}__contentpage`}

+ 1 - 1
src/index.js Просмотреть файл

@@ -3,7 +3,7 @@ import libPopinFixedHeader from './component/PopinFixed/PopinFixedHeader.jsx'
3 3
 import libPopinFixedOption from './component/PopinFixed/PopinFixedOption.jsx'
4 4
 import libPopinFixedContent from './component/PopinFixed/PopinFixedContent.jsx'
5 5
 
6
-import libTimeline from './component/Timeline.jsx'
6
+import libTimeline from './component/Timeline/Timeline.jsx'
7 7
 
8 8
 export const PopinFixed = libPopinFixed
9 9
 export const PopinFixedHeader = libPopinFixedHeader