panel/strip: add "border" option

This commit is contained in:
jean-emmanuel 2017-07-21 19:21:00 +02:00
parent d807032ace
commit e1b32987d5
5 changed files with 25 additions and 5 deletions

View file

@ -25,13 +25,13 @@ module.exports = class Panel extends _widgets_base {
color:'auto',
css:'',
_layout:'layout',
_layout:'panel',
border:true,
layout:'',
spacing:0,
_osc:'osc',
value:'',
@ -55,7 +55,8 @@ module.exports = class Panel extends _widgets_base {
super({...options, html: '<div class="panel"></div>'})
if (!this.getProp('scroll')) this.widget.addClass('noscroll')
if (this.getProp('scroll') === false) this.widget.addClass('noscroll')
if (this.getProp('border') === false) this.container.addClass('noborder')
if (this.getProp('tabs') && this.getProp('tabs').length) this.widget.addClass('has-tabs')
@ -191,7 +192,7 @@ module.exports = class Panel extends _widgets_base {
$(window).resize()
}
this.navigation.find('li').removeClass('on').eq(v).addClass('on')
if (options.send) this.sendValue()

View file

@ -22,6 +22,7 @@ module.exports = class Strip extends Panel {
horizontal:false,
stretch:false,
border:true,
spacing:0,
_children:'children',

View file

@ -84,6 +84,14 @@
}
&.noborder {
--color-border: var(--color-fg);
> .panel {
box-shadow: none;
}
}
}