Skylsmoi пре 7 година
родитељ
комит
80ba9f6a38

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/tracim_lib.js


+ 16 - 0
src/component/Input/BtnSwitch/BtnSwitch.jsx Прегледај датотеку

1
+import React from 'react'
2
+
3
+require('./BtnSwitch.styl')
4
+
5
+export const BtnSwitch = props =>
6
+  <div className='btnswitch'>
7
+    <label className='switch nomarginlabel'>
8
+      <input type='checkbox' />
9
+      <span className='slider round' />
10
+    </label>
11
+    <div className='btnswitch__text'>
12
+      On
13
+    </div>
14
+  </div>
15
+
16
+export default BtnSwitch

+ 57 - 0
src/component/Input/BtnSwitch/BtnSwitch.styl Прегледај датотеку

1
+@import '../../../css/Variable.styl'
2
+
3
+.btnswitch
4
+  display flex
5
+  align-items center
6
+  &__text
7
+    margin-left 10px
8
+
9
+.switch
10
+  position relative
11
+  display inline-block
12
+  width 60px
13
+  height 34px
14
+
15
+.switch input
16
+  display none
17
+
18
+.slider
19
+  position absolute
20
+  cursor pointer
21
+  top 0
22
+  left 0
23
+  right 0
24
+  bottom 0
25
+  background-color #ccc
26
+  -webkit-transition .4s
27
+  transition .4s
28
+
29
+.slider:before
30
+  position absolute
31
+  content ""
32
+  height 26px
33
+  width 26px
34
+  left 4px
35
+  bottom 4px
36
+  background-color white
37
+  -webkit-transition .4s
38
+  transition .4s
39
+
40
+input:checked + .slider
41
+  background-color blue
42
+
43
+input:focus + .slider
44
+  box-shadow 0 0 1px blue
45
+
46
+input:checked + .slider:before
47
+  -webkit-transform translateX(26px)
48
+  -ms-transform translateX(26px)
49
+  transform translateX(26px)
50
+
51
+/* Rounded sliders */
52
+.slider.round
53
+  border-radius 34px
54
+
55
+.slider.round:before
56
+  border-radius: 50%
57
+

src/component/Input/TextAreaPlugin.jsx → src/component/Input/TextAreaPlugin/TextAreaPlugin.jsx Прегледај датотеку


src/component/Input/TextAreaPlugin.styl → src/component/Input/TextAreaPlugin/TextAreaPlugin.styl Прегледај датотеку

1
-@import '../../css/Variable.styl'
1
+@import '../../../css/Variable.styl'
2
 
2
 
3
 .editiontitle
3
 .editiontitle
4
   width 60%
4
   width 60%

+ 4 - 1
src/index.dev.js Прегледај датотеку

6
 import PopinFixedOption from './component/PopinFixed/PopinFixedOption.jsx'
6
 import PopinFixedOption from './component/PopinFixed/PopinFixedOption.jsx'
7
 import PopinFixedContent from './component/PopinFixed/PopinFixedContent.jsx'
7
 import PopinFixedContent from './component/PopinFixed/PopinFixedContent.jsx'
8
 
8
 
9
-import TextAreaPlugin from './component/Input/TextAreaPlugin.jsx'
9
+import TextAreaPlugin from './component/Input/TextAreaPlugin/TextAreaPlugin.jsx'
10
+import BtnSwitch from './component/Input/BtnSwitch/BtnSwitch.jsx'
10
 
11
 
11
 import Timeline from './component/Timeline/Timeline.jsx'
12
 import Timeline from './component/Timeline/Timeline.jsx'
12
 
13
 
19
       onClickCloseBtn={() => {}}
20
       onClickCloseBtn={() => {}}
20
     />
21
     />
21
 
22
 
23
+    <BtnSwitch />
24
+
22
     <PopinFixedOption customClass={`${'randomClass'}`} />
25
     <PopinFixedOption customClass={`${'randomClass'}`} />
23
 
26
 
24
     <PopinFixedContent customClass={`${'randomClass'}__contentpage`}>
27
     <PopinFixedContent customClass={`${'randomClass'}__contentpage`}>

+ 3 - 1
src/index.js Прегледај датотеку

5
 
5
 
6
 import libTimeline from './component/Timeline/Timeline.jsx'
6
 import libTimeline from './component/Timeline/Timeline.jsx'
7
 
7
 
8
-import libTextAreaPlugin from './component/Input/TextAreaPlugin.jsx'
8
+import libTextAreaPlugin from './component/Input/TextAreaPlugin/TextAreaPlugin.jsx'
9
+import libBtnSwitch from './component/Input/BtnSwitch/BtnSwitch.jsx'
9
 
10
 
10
 export const PopinFixed = libPopinFixed
11
 export const PopinFixed = libPopinFixed
11
 export const PopinFixedHeader = libPopinFixedHeader
12
 export const PopinFixedHeader = libPopinFixedHeader
15
 export const Timeline = libTimeline
16
 export const Timeline = libTimeline
16
 
17
 
17
 export const TextAreaPlugin = libTextAreaPlugin
18
 export const TextAreaPlugin = libTextAreaPlugin
19
+export const BtnSwitch = libBtnSwitch