File tree Expand file tree Collapse file tree 9 files changed +43
-18
lines changed Expand file tree Collapse file tree 9 files changed +43
-18
lines changed Original file line number Diff line number Diff line change 1
1
2
- mixin code(label = '' )
2
+ mixin code(options = {} )
3
3
-
4
+ const {
5
+ label = ' '
6
+ } = options;
4
7
const BASE_CLASS = ' code' ;
5
8
const CODE_TOP = ' $(\' .demo\' ).RangeSliderFox({' ;
6
9
const CODE_BOTTOM = ' })' ;
Original file line number Diff line number Diff line change 1
1
include ../toggle/toggle.pug
2
2
include ../text-field/text-field.pug
3
3
4
- mixin grid(label = '' )
4
+ mixin grid(options = {} )
5
5
-
6
+ const {
7
+ label = ' '
8
+ } = options;
6
9
const BASE_CLASS = ' grid'
7
10
const data = require (' ./grid.json' );
8
11
const textField = data .textField
Original file line number Diff line number Diff line change 1
1
include ../toggle/toggle.pug
2
2
include ../text-field/text-field.pug
3
3
4
- mixin hints(label = '' )
4
+ mixin hints(options = {} )
5
5
-
6
+ const {
7
+ label = ' '
8
+ } = options;
6
9
const BASE_CLASS = ' hints'
7
10
const data = require (' ./hints.json' );
8
11
const textField = data .textField
Original file line number Diff line number Diff line change 1
1
include ../text-field/text-field.pug
2
2
3
- mixin input-data(label = '' )
3
+ mixin input-data(options = {} )
4
4
-
5
+ const {
6
+ label = ' '
7
+ } = options;
5
8
const BASE_CLASS = ' input-data'
6
9
7
10
fieldset( class =` ${ BASE_CLASS } js-${ BASE_CLASS } ` )
Original file line number Diff line number Diff line change 1
1
include ../text-field/text-field.pug
2
2
3
- mixin keyboard-control(label = '' )
3
+ mixin keyboard-control(options = {} )
4
4
-
5
+ const {
6
+ label = ' '
7
+ } = options;
5
8
const BASE_CLASS = ' keyboard-control'
6
9
const data = require (' ./keyboard-control.json' );
7
10
const textField = data .textField
Original file line number Diff line number Diff line change 1
1
include ../toggle/toggle.pug
2
2
include ../select/select.pug
3
3
4
- mixin miscellaneous(label = '' )
4
+ mixin miscellaneous(options = {} )
5
5
-
6
+ const {
7
+ label = ' '
8
+ } = options;
6
9
const BASE_CLASS = ' miscellaneous'
7
10
const data = require (' ./miscellaneous.json' );
8
11
const selectData = data .select
Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ include ../miscellaneous/miscellaneous.pug
6
6
include ../code/code.pug
7
7
include ../keyboard-control/keyboard-control.pug
8
8
9
- mixin panel(theme = 'base' )
9
+ mixin panel(options = {} )
10
10
-
11
+ const {
12
+ theme = ' base'
13
+ } = options;
14
+
11
15
const BASE_CLASS = ' panel'
12
16
13
17
div( class =` ${ BASE_CLASS } js-${ BASE_CLASS } ` )
@@ -21,22 +25,22 @@ mixin panel(theme = 'base')
21
25
)
22
26
23
27
div( class =` ${ BASE_CLASS } __values-wrapper` )
24
- + values('Values' )
28
+ + values({label : ' Values' } )
25
29
26
30
div( class =` ${ BASE_CLASS } __input-data-wrapper` )
27
- + input-data('Input data' )
31
+ + input-data({label : ' Input data' } )
28
32
29
33
div( class =` ${ BASE_CLASS } __keyboard-control-wrapper` )
30
- + keyboard-control('keyboard control' )
34
+ + keyboard-control({label : ' keyboard control' } )
31
35
32
36
div( class =` ${ BASE_CLASS } __grid-wrapper` )
33
- + grid('Grid' )
37
+ + grid({label : ' Grid' } )
34
38
35
39
div( class =` ${ BASE_CLASS } __different-wrapper` )
36
- + miscellaneous('Miscellaneous' )
40
+ + miscellaneous({label : ' Miscellaneous' } )
37
41
38
42
div( class =` ${ BASE_CLASS } __hints-wrapper` )
39
- + hints('Hints' )
43
+ + hints({label : ' Hints' } )
40
44
41
45
div( class =` ${ BASE_CLASS } __code-wrapper` )
42
- + code('Config code' )
46
+ + code({label : ' Config code' } )
Original file line number Diff line number Diff line change 1
1
include ../text-field/text-field.pug
2
2
3
- mixin values(label = '' )
3
+ mixin values(options = {} )
4
4
-
5
+ const {
6
+ label = ' '
7
+ } = options;
5
8
const BASE_CLASS = ' values'
6
9
const data = require (' ./values.json' );
7
10
const textField = data .textField
Original file line number Diff line number Diff line change @@ -9,15 +9,15 @@ block content
9
9
10
10
section.slider
11
11
.slider__panel-wrapper
12
- + panel('fox' )
12
+ + panel({theme : ' fox' } )
13
13
14
14
section.slider
15
15
.slider__panel-wrapper
16
- + panel('dark' )
16
+ + panel({theme : ' dark' } )
17
17
18
18
section.slider
19
19
.slider__panel-wrapper
20
- + panel('base' )
20
+ + panel({theme : ' base' } )
21
21
22
22
section.slider
23
23
.initialization-plugin
You can’t perform that action at this time.
0 commit comments